Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 07 19:54
    cacaodev commented #2970
  • Mar 07 19:48

    cacaodev on master

    Manual test exposing issue #2970 (compare)

  • Mar 07 10:55
    didierkorthoudt commented #2970
  • Mar 07 07:48

    cacaodev on master

    Fixed: CPTextView now handles m… Merge pull request #2962 from m… (compare)

  • Mar 07 07:48
    cacaodev closed #2962
  • Mar 02 10:21
    cappbot commented #2915
  • Mar 02 10:21
    cappbot unlabeled #2915
  • Mar 02 10:21
    cappbot labeled #2915
  • Mar 02 10:21
    cappbot commented #2955
  • Mar 02 10:21
    cappbot labeled #2955
  • Mar 02 10:21
    cappbot labeled #2955
  • Mar 02 10:21
    cappbot labeled #2955
  • Mar 02 10:21
    cappbot unlabeled #2955
  • Mar 02 10:21
    cappbot commented #2958
  • Mar 02 10:21
    cappbot labeled #2958
  • Mar 02 10:21
    cappbot unlabeled #2958
  • Mar 02 10:21
    cappbot commented #2967
  • Mar 02 10:21
    cappbot unlabeled #2967
  • Mar 02 10:21
    cappbot labeled #2967
  • Mar 02 10:20
    cappbot commented #2969
enquora
@enquora:matrix.org
[m]
Out projects contain many hundreds of Objective-J files and I prefer to have Xcode auto-detect the language and apply the correct syntax. This requires a language-specific xclangspec. Such a thing was created a decade ago, but security problems prior to release of Xcode 8 led to Apple changing and locking the plug-in architecture which Xcode is built on. Language syntax highlighting is the only aspect of the plug-in architecture which doesn’t now require Apple-signed code.
*Our projects contain
LSP doesn’t currently support syntax highlighting. I expect that to change. When it does, language support will be editor-independent, supported by out-of-process language-specific servers.
Michael Bach
@michaelbach

It provides syntax highlighting for files with the extension .j, no more or less. …

Ok, I understand. Thank you.

David Richardson
@enquora

@michaelbach It appears the Xcode editor is also using the lexing/parsing instructions in xcclangspec to create auto-complete suggestions. I’m guessing this is a default, and the presence of sourcekit-lsp (for C, C++ and Objective equivalents) is a trigger to use the LSP.

Further experience needed with this. An xclangspec will be needed for Jakefiles too. This doesn’t look nearly as daunting as for Objective-J itself.

Auto-completion, even if less-than-perfect, is a useful convenience with Cocoa
David Richardson
@enquora
@didierkorthoudt CPBox instances with 0 borderWidth should not display a border. That’s not currently the case - at least with ones created in IB.
David Richardson
@enquora

I have a CPWindow containing a CPBox which must retain a predefined aspect ratio when the window is resized. The window and view are loaded from a cib - the cib’s owner is a CPViewController subclass. I would like to specify a custom class in IB for the view with the aspect ratio requirement, and implement the drawing constraints in the view’s definition.

An error is thrown when loading the window: Cappuccino [error]: Unable to find class CustomBox referenced in cib file.. The location of the custom class definition within the project folder doesn’t seem to make a difference. Doing this in an Objective-C project is not a problem - is this a known limitation of nib2cib? An incorrect implementation of something intended to work?

I can perfom the constraint calculations in the view controller, after receiving a window resize message, and apply them to the view - but this seems awkward and a poor separation of concerns. Am I approaching this the wrong way? @mrcarlberg Is this something you’re aware of/have experience with?

This problem occurs when specifying a custom class of any sort in IB. And yes, the Objective-C class pair has been generated - and nib2cib doesn’t complain when converting. It appears to be a runtime class resolution error.
enquora
@enquora:matrix.org
[m]
Is it necessary to explicitly import the CustomClass definition file somewhere in the project? In the ApplicationDelegate?
enquora
@enquora:matrix.org
[m]
I’m now guessing it must be imported in the xib’s owner, in this case the view’s controller class. Can anyone confirm this?
enquora
@enquora:matrix.org
[m]
Objective-C seems to handle this automatically - does anyone know how?
aksuska
@aksuska
@enquora This has been a longstanding issue with nib2cib. I only recall, however, that this happens with any use of the "custom object", and, if my memory serves, even if you specify a Cappuccino class. I have been able to use custom subclasses of regular IB objects without difficulty.
David Richardson
@enquora
@aksuska @import in the xib’s owner is, indeed, what is needed in this situation. My (admittedly much simplified) test in Objective-C found the class without an explicit import anywhere, though. Initial compilation of the Objective-C project did take a remarkably long time - presumably something is being done during the build or linking phase to find file references which exist only in a xib.
David Richardson
@enquora
@aksuska I normally use the file:// protocol to test during development, so the runtime would need to handle this for automatic loading of references found only in xibs/cibs. Probably a rabbit-hole we don’t want to go down. Objective-C has no ability to run a project without a full build - doesn’t seem practical to copy anything it might be doing in this case.
Michael Bach
@michaelbach
Dear All: I was just chatting with Daniel (daboe01) and the thought came to mind that we haven't "met" for a long time and that we could do this on-line. Here at the Eye Center we have a Zoom license we could use (when known long beforehand). Daniel & me would be happy to organise it, we could also present something (me, for instance, on »NW.js« to produce a stand-alone "doubleclickable" app from Cappuccino). Contributions from you would be MOST welcome! Not as good as having an actual beer (or 2) together, but at least something to lift the spirits!
daboe01
@daboe01
@michaelbach yes, let us have a virtual CappCon 2021! The next major release is overdue IMHO :-)
charliev
@charliev
+1 I'll bring my own beer (or 2)
Anyway: what is the preferred Java to get cappuccino running ?
I recently had to fresh install and inadvertently skipped the java install and much to my surprise: it worked !
... but not all the way. (xcodecapp was giving me a hard time too)
So back to yet another fresh install and this time decided to follow the link... To Adobe ! What is this all about ?
daboe01
@daboe01

Anyway: what is the preferred Java to get cappuccino running ?
I recently had to fresh install and inadvertently skipped the java install and much to my surprise: it worked !
... but not all the way. (xcodecapp was giving me a hard time too)
So back to yet another fresh install and this time decided to follow the link... To Adobe ! What is this all about ?

IIRC i used the latest java dist for mac from the oracle website

What link to adobe are you referring to?
charliev
@charliev
When I run the bootstrap.sh I get a popup asking me to install java. On agree, it takes me to Adobe.com
Thought it was some sort of practical joke
Michael Bach
@michaelbach
@charliev That's surprising. In bootstrap.sh it says "Please upgrade to OpenJDK >= 6b18 or switch to the Sun JVM". I don't see Adobe anywhere.
Homebrew can also install Java (but I haven't done so).
charliev
@charliev
Screenshot 2021-02-16 at 12.42.48.png
daboe01
@daboe01
this popup is from apple IMHO
Michael Bach
@michaelbach

this popup is from apple IMHO

yes

charliev
@charliev
Yes of course it is from Apple. Should have known, sorry. When I click "more info" Safari open shttps://www.adobe.com/products/flashplayer/end-of-life.html
(clearly after some redirection has occurred)
Anyway, java versions & numbers are very confusing: which one to go ?
thanks,
daboe01
@daboe01
i went with the latest back then, 11.0.7
David Richardson
@enquora
Rhino makes heavy use of Java reflection APIs which have been deprecated - Java 12 began posting incessant warnings about this. I’ve forgotten whether this behaviour was present in 11 too. I use 8. OpenJDK is preferrable since Oracle’s licensing changes came into effect.
charliev
@charliev
A-ok, thx
David Richardson
@enquora

Can anyone confirm, from direct experience, that scaleUnitSquareToSize works correctly and reliably for scale sizes 1.0 and above? We have a printed page preview scaled to fit in a resizable window - resizing the window changes the scale while pinning the aspect ratio. Works fine with scales below 1.0, but above that odd things happen. Also, setCenter works as expected with scales above 1.0 - but not with scales below.

It’s possible the aspect pinning algorithm is at fault, but it’s rather simple.

Experience in this area, anyone?

daboe01
@daboe01
@enquora i have never used scaleUnitSquareToSize, but had a look at the source. interestingly, the documentation is not congruent with the code (shouldn't this be a division instead of a multiplication, as is the case in gnustep?)
Bildschirmfoto 2021-02-20 um 19.40.45.png
David Richardson
@enquora
@daboe01 I’m looking at this over the weekend. I’ll look at Cocotron’s implementation too. I’m most definitely seeing problematic behaviour when the scaling factor is 1.0 or greater, whereas everything works fine when it is below 1.0. My workaround is to double the default scale of the view so window resizing never requires a scale >= 1.0, then to scale back down when reading the subview geometery for other purposes.
no help from Cocotron: NSUnimplementedMethod();
aksuska
@aksuska
Has anyone else experienced weird cib caching issues? I have a view loaded by a view controller, which is in turn loaded by a window controller that load a window cib. When the window is closed everything under it should be garbage collected. When the window is subsequently opened, everything except the view controller's cib is reloaded--i.e. the window controller's cib and all image resources are reloaded, just not the VC cib. Caching is disabled and I can see in Chrome Dev Tools that there is no attempt to re-load, even from browser cache. Is there some way that CPViewController is caching cibs?
aksuska
@aksuska
Is there a trick to getting a CPArrayController to modify the bound data model array when using the -add/insert: and -remove: action methods? It is certainly a bug, though I thought I was able to get this to work once, but maybe not since I don't tend to use it.
timhowell01
@timhowell01
Is there a (hopefully straightforward) way to enable using the tab key to move through the cells of a cell-based CPTableView? Some of the solutions I've seen for NSTableView don't appear to work because of delegate methods that don't exist in CPTableView.
aksuska
@aksuska
Probably another reportable bug, but I am running across an issue where in text fields, despite being set with a bold font, verified by console logging, do not display as bold and do not define font weight in the source CSS. Is this a known issue and is there a workaround?
aksuska
@aksuska
@timhowell01 OTOH you could implement the willDisplayCell delegate, and set your controller as the delegate for the text field. In controlTextDidBeginEditing you would call editedRow/editedColumn and save those values for later. In controlTextDidEndEditing you can determine the next logical field based on the saved value and call -editColumn:row:withEvent:select: as needed. May or may not work, depending on whether the methods in question are implemented like Cocoa.
daboe01
@daboe01
Is there a (hopefully straightforward) way to enable using the tab key to move through the cells of a cell-based CPTableView? Some of the solutions I've seen for NSTableView don't appear to work because of delegate methods that don't exist in CPTableView.

@implementation SpreadheetTableView:FSTableView

  • (void) _moveSelectionIntoDirection:(integer)direction
    {
    var nextRow;
    for(nextRow = [self selectedRow] + direction; nextRow >= 0 && nextRow < [self numberOfRows] ; nextRow += direction)
    {

      if ([[self preparedViewAtColumn:1 row:nextRow]._myView._myView isKindOfClass:CPTextField])
          break;

    }

    if(nextRow < 0 || nextRow >= [self numberOfRows])

      return;

    [self selectRowIndexes:[CPIndexSet indexSetWithIndex:nextRow] byExtendingSelection:NO];
    [self editColumn:1 row:nextRow withEvent:nil select:YES];
    }

-(void) keyUp:(CPEvent)event
{ var direction = (event._modifierFlags & CPShiftKeyMask)? -1 : 1;

[super keyUp:event]

if (event._characters == "\t")
{
    [[CPRunLoop currentRunLoop] performSelector:@selector(_moveSelectionIntoDirection:) target:self argument:direction order:0 modes:[CPDefaultRunLoopMode]];
    [[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
}

}

@end

Is there a trick to getting a CPArrayController to modify the bound data model array when using the -add/insert: and -remove: action methods? It is certainly a bug, though I thought I was able to get this to work once, but maybe not since I don't tend to use it.

works for me. can you post a reduction?

jasperdeb
@jasperdeb

Is there a (hopefully straightforward) way to enable using the tab key to move through the cells of a cell-based CPTableView? Some of the solutions I've seen for NSTableView don't appear to work because of delegate methods that don't exist in CPTableView.

I simply use this one (link is in the Github modules pages of the Cappuccino wiki) https://github.com/coalkids/SpreadSheetTableView, it works great for me

Didier Korthoudt
@didierkorthoudt

Hi everybody !

Well, I have to apologize for those 2-3 monthes off… Life is all but a slow and peaceful river… Many things happened during that time. I’m now ready to re-open to the world and to Cappuccino. I’ve begun to re-discover where I was in Aristo3 development, to answer to opened issues, and so on.

I think I’m now at the beginning of a new part of my life (a beautifil one), and I hope your all are well and safe !

I’ll try to read all gitter messages (a lot !)

To illustrate my current (new) way of thinking, I’m already preparing CappCon 2022 (or late 2021) ;-)

daboe01
@daboe01
@didierkorthoudt thank you for this wonderful news!
aksuska
@aksuska
I am getting inconsistent behavior with table column resizing when dynamically showing/hiding columns--i.e. sometimes a column resizing to fill the empty space and other times not changing until the enclosing view is resized. Is there a way to "force" a redraw as if the enclosing view changed size?
aksuska
@aksuska

Never mind, I found the solution. For prosperity, I call -resizeWithOldSuperviewSize: with the existing superview. Size.

I am getting inconsistent behavior with table column resizing when dynamically showing/hiding columns--i.e. sometimes a column resizing to fill the empty space and other times not changing until the enclosing view is resized. Is there a way to "force" a redraw as if the enclosing view changed size?

Michael Bach
@michaelbach
@didierkorthoudt: I am very happy to hear you're at it! Thank you. Very much looking forward to Aristo 3!