Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 04 16:05
    didierkorthoudt synchronize #2689
  • Apr 04 16:02
    didierkorthoudt commented #2761
  • Apr 04 16:01
    didierkorthoudt synchronize #2761
  • Apr 04 15:48
    blankyao starred cappuccino/cappuccino
  • Apr 04 13:12
    didierkorthoudt commented #2777
  • Apr 04 13:11
    didierkorthoudt commented #2777
  • Apr 04 13:07
    didierkorthoudt synchronize #2777
  • Apr 01 12:43
    pcr910303 starred cappuccino/cappuccino
  • Mar 25 18:47
    cappbot commented #2894
  • Mar 25 18:47
    cappbot unlabeled #2894
  • Mar 25 18:21
    daboe01 commented #2894
  • Mar 23 17:30
    cappbot commented #2894
  • Mar 23 17:30
    cappbot labeled #2894
  • Mar 23 17:03
    daboe01 commented #2894
  • Mar 23 17:03
    daboe01 commented #2894
  • Mar 23 17:02
    daboe01 commented #2894
  • Mar 23 11:33
    cappbot commented #2894
  • Mar 23 11:33
    cappbot labeled #2894
  • Mar 23 11:33
    cappbot labeled #2894
  • Mar 23 11:33
    cappbot labeled #2894
daboe01
@daboe01
@enquora CPCollectionView heavily reuses items internally. not sure about the modern cocoa API
David Richardson
@enquora
@daboe01 CPCollectionView grinds to a halt with a non-trivial item view and several hundred rows. It can’t be using the modern cell/view reuse found in CPTableView. The API supports this assessment, although I haven’t (and don’t have time) to look carefully at the source.
Although we’re successfully using view swapping in the prototype the sudden transitions are less than ideal. Looking at open source carousel implementations now, although CSS animations of view disappearing and appearing might work
David Richardson
@enquora
One welcome observation though - while copying and pasting the existing cell view from elsewhere it no longer became a stack of unorganized sub views when pasted in the target view. This is with Xcode 11.4
David Richardson
@enquora
How would one animate a view out, while simultaneously animating a view in — using either CSS or native Cappuccino?
Didier Korthoudt
@didierkorthoudt
@enquora You could have to look to view animator…
CPViewAnimator, playing with opacity…
David Richardson
@enquora
The old view needs to move up or down, like a carousel, with the new one seeming to push it
Didier Korthoudt
@didierkorthoudt
@enquora Well, view animator with setFrame should do the trick. Let me check.
timhowell01
@timhowell01
I know this was discussed in the past--did anyone ever make Retina/@2x versions of the Aristo2 images?
daboe01
@daboe01

@enquora

@daboe01 CPCollectionView grinds to a halt with a non-trivial item view and several hundred rows. It can’t be using the modern cell/view reuse found in CPTableView. The API supports this assessment, although I haven’t (and don’t have time) to look carefully at the source.

you obviously mean the lazy DOM loading feature, that is to put only visible items into the dom. this indeed is not yet in CPCollectionView (i have a branch in my repo). you can alternatively try CPTextView with the new view-embedding feature for this.

Michael Bach
@michaelbach
In Chrome: "Uncaught DOMException".
Dear Cappuccino masters: I recently noticed on another site which embeds my Capp. programs that it does not work any more in Chrome. Now I have found that the same happens in a local server (a ruby server because my site is in Jekyll). No error with Safari nor FireFox, but in Chrome this appears when the loading progress bar gets stuck at its end:
VM90:439 Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
at objj_class.$CPUserDefaultsLocalStore__supportsLocalStorage (eval at _300.setCode (http://localhost:4000/fract/FrACT10/capp/Frameworks/Objective-J/Objective-J.js:10009:16), <anonymous>:439:17)
at _objj_forward (http://localhost:4000/fract/FrACT10/capp/Frameworks/Objective-J/Objective-J.js:10605:13)… etc…
sent too early… Looking forward to your help! Best, Michael
David Richardson
@enquora

@daboe01 CPTextView doesn’t feel like a fit at all, but I’m not certain even a CPCollectionView scrolling in the vertical axis is - once a collection item is selected we want just a single view visible (the editing interface for the underlying collection item). This is complicated by the editing interface needing a scroll view itself.

This interface is the core functionality of our app and I’m hoping to go beyond the abrupt transitions of simple view swapping - they work, but feel unpolished. Users are in this interface an hour or more a day, so polish is much appreciated by them.

daboe01
@daboe01
@enquora would it be possible to post a screenshot?
Didier Korthoudt
@didierkorthoudt
@enquora Here is a test app using CPAnimation…
Didier Korthoudt
@didierkorthoudt
switch.gif
BTW, as you can see, we still have this little string width bug… 😉
Didier Korthoudt
@didierkorthoudt
Well, in fact, it could even be more fluid if you put the 2 views into a single « slidingView » and animate it.
David Richardson
@enquora
@daboe01 @didierkorthoudt I’ve just sent a screenshot privately to each of you.
View swapping is working for each of the first three items in the source list Table of Contents. I mentioned in the autumn I was converting an Objective-C SourceList abstraction to Cappuccino - this is what it is for (the abstraction cleans up much of the fiddly setup of source lists). Completing that conversion is my immediate concern (I was pulled away from it over the winter by other work), but within three weeks or so the rest of this module needs to be mostly usable - so I’m beginning to tackle improving the navigation (absolutely needs to be keyboard driven in addition to point-and-click in the source list)
David Richardson
@enquora
It’s really a carousel with just a single view (the selected one) visible while at rest, with the leading or trailing view visible only during the navigation transition - to anchor the user’s sense of place in the collection of items. I’m also looking at Objective-C implementations of CoverFlow to see how they’re done.
David Richardson
@enquora

This all feels very much like the first version of this app back in 2003-2005 when it wasn’t at all clear HTML/Javascript was capable of doing what was necessary. And our requirements were much simpler then. The difference is I know now it is possible, but I’ve found no existing Cocoa apps (native or Cappuccino) for inspiration.

It’s also important to note there are/will be phone and tablet versions (native code) of the app and the navigation concepts should be as similar as possible, within the constraints of screen size (An outline view simply doesn’t work well on a touch interface, and a navigation stack (UINavigationController) in the Cappuccino app loses the always-visible Table of Contents which is very useful to users.

Comments, observations and suggestions welcome

@didierkorthoudt Although our transitions are vertical, CPViewAnimation might work, but combining the leading/trailing view with the one acquiring focus would be a nightmare, I suspect. This really is a CPCollectionView situation, I believe. But our current implementation doesn’t look up to the task and I don’t have the luxury of that technical risk at the moment.
David Richardson
@enquora
For a bit more context, this app manages the collection of data for industrial non-destructive testing and the associated report generation and management (radiography, ultrasonics, etc) or the same for environmental compliance testing (vegetation/forestry regeneration, soil contamination, ground-water characteristics, wildlife habitat). The first iteration was done on Palm Pilots in the very late 1990s, then web versions were created in 2002-2005 using custom Firefox extensions (for offline usage). The Firefox version still works, but all the code was created without the benefit of any experience or guidelines to follow. Requirements have increased in complexity by an order of magnitude and managing the initial code-base has become an exponentially difficult problem.
A Cappuccino app to manage parts of the system has been in operation for more than half a decade but the challenge now is to move the data capture of test observations/readings, which has been tabular, to a modern system which accommodates more hierarchical data.
David Richardson
@enquora
This is the source list abstraction we’re converting for Cappuccino usage: https://github.com/Perspx/PXSourceList
David Richardson
@enquora
The cell-based example almost perfectly illustrates our usage case. Both examples use a single static view which simply updates a label in the right pane of the NSSplitView. In our case we have different detail views for many of the items in the source list. I’m looking at ways to show a vertical transition as the users moves up and down through the source list view, whether that navigation is by directly clicking an item or using keyboard navigation. This is complicated by the source list representing a tree structure rather than a simple array/list. It’s unclear to me yet what form that navigation should take - moving up and down the source list at the same tree level one is at or, instead, moving in and out in the tree as required.
CPOutlineView/NSOutlineView can be fiddly to configure as a source list, hence the desirablility of an abstraction like this framework.
CPOutlineView also maps acceptably to UINavigationController for iOS usage.
Michael Bach
@michaelbach
@michaelbach: I found the cause of the problem "Uncaught DOMException…". In Chrome's preferences, I had set "Block third-party cookies…". That prevented cappuccino's initial reading of CPUserDefaults.
David Richardson
@enquora
@daboe01 It helps to have external validation of one’s thinking - thanks. A single-column CPTableView is indeed where my thinking was heading.
There was once a Cappuccino-based time tracking app/service (by @me1000, afaik). It used a source list for navigation and although the data structures were much less complex than ours it was similar in concept.
David Richardson
@enquora
That implementation, like every other usage of sourcekit I’ve seen, used simple view swapping when navigating to a new detail view. It works, but when the number of items in the source list reaches more than a handful it’s useful to animate the detail view transition with movement corresponding to the direction one is moving in the sourcelist.
jasperdeb
@jasperdeb
Is there a way for a CPWebView to load and then programatically push on a certain defined point in the loaded web page? I had a solution where I loaded a CPWebView on an external website based on their URL where I filled in the company identification number and directly got these results. But now they added an invisible Google Recapcha. Now users get an error, and need to manually push again on a button to get the requested view...
David Richardson
@enquora
@daboe01 Apple’s sourcelist example code https://developer.apple.com/documentation/appkit/cocoa_bindings/navigating_hierarchical_data_using_outline_and_split_views?language=objc implements everything I need or want except detail view animations. It is implemented in Swift (not a problem) and uses modern APIs. Playing with keyboard navigation as implemented in it answers my questions - their choices work very well.
@jasperdeb Do you mean navigating to a page anchor link?
David Richardson
@enquora
@daboe01 I shouldn’t say the Apple example implements everything I need or want - in my case it is necessary to badge navigation items (to indicate completeness, error conditions and child item counts) . Those can obviously be added using a view-based CPOutlineView but the framework I started converting from Objective-C has nice abstractions already for that. I’ll likely be coming back to that conversion once our implementation is working. Animations fall into the same category.
David Richardson
@enquora

Is anyone using localstorage to save and restore app state, particularly CPOutlineView or CPTableView (selected item, outline expanded/collapsed state)? If so, how are you dealing with it?

I’m just beginning to deal with this and came across https://developer.apple.com/documentation/appkit/nsresponder/1526236-encoderestorablestatewithcoder?language=objc. We don’t implement any of the CPResponder methods described. I had always assumed it would be necessary to code/decode either the entire view (which I don’t like doing because it’s a snapshot linked to data which might have changed) or write a custom mechanism to code/decode something like the state of a CPOutlineView.

daboe01
@daboe01
@enquora i prefer bindings to restore state.
David Richardson
@enquora
@didierkorthoudt We don’t seem to define _sourceListBackgroundColor - what are you doing for system colour definitions? Matching macOS or are we creating our own palette?
David Richardson
@enquora
Vibrancy effects make getting an accurate color sample difficult when using colour sampling tool :-(
David Richardson
@enquora
@mrcarlberg Where is the code which generates Dash docsets for Cappuccino? I’d like to run it against master.
Didier Korthoudt
@didierkorthoudt
@mrcarlberg Hi Martin ! Hope everything is OK for you and your family… After 3 hard weeks here at work (had to put our university online and support our hospital), I can now find some time. I’ve pushed a better solution for #2777
Didier Korthoudt
@didierkorthoudt
BTW, dear all, are you OK ? And your families too ?
daboe01
@daboe01
@didierkorthoudt we are currently OK. thank you. how are you doing?
Didier Korthoudt
@didierkorthoudt
@daboe01 Things are going to slow down to a « normal » state… :-)
David Richardson
@enquora
@didierkorthoudt Using the economic hibernation period here and associated decline in user activity with our legacy apps to accelerate and finalize transition to Cappuccino version. Physically healthy but, like everyone everywhere, suffering from what we call ‘cabin fever’ - even though our suburban sprawl makes walking outdoors much safer than many places.
It’s good to hear you’re ok.