Every repository with this icon (
Every repository with this icon (
| Description: | Web Application Framework in JavaScript and Objective-J edit |
-
2 comments Created 6 months ago by 280north#to-reviewxPlist parser fails on IE8 when there's no DTD header in XMLfrom-lighthousexI’m trying to parse a XML string (provided from xslt conversion) in IE8. It doesn’t contain DTD header, but starts directly with "<?xml version".
First problem I encountered was that Objective-J.js at line 844 removes 6 characters from the start making xml document not a xml document any more, thus I changed it to read:
XMLNode.loadXML(XMLNodeOrData.string);at this point XMLNode seemed to load my string without any problems, but it dies on the next loop:
while (((String(XMLNode.nodeName)) == XML_DOCUMENT) || ((String(XMLNode.nodeName)) == XML_XML)) XMLNode = (XMLNode.firstChild);first node (XMLNode) is XML_DOCUMENT. It’s firstChild is XML_XML. But plist is not firstChild of XML_XML but rather nextSibling.
if I set XMLNode to plist node it continues from this point without any problem.
PS: WebKit handles same xml string without any problem (tested on Chrome, Safari, nightly WebKit).
This ticket has 1 attachment(s).
Comments
-
3 comments Created 6 months ago by 280north#needanswerxBug in internet exporer when refreshing page?from-lighthousexIf I refresh or visit the page in the same tab in IE 7 (not tested on 6) I keep getting the error: "’_DOMBodyElement’ is null or not an object.". I tested to clear all cache the cache in IE and the error dissapeared for one refresh.
This ticket has 0 attachment(s).
Comments
Bug in internet exporer when refreshing page?
Yes, I’ve definitely experienced this, will look into it.
by Francisco Tolmasky
Bug in internet exporer when refreshing page?
any updates?
by Ross Boucher
BlairDuncan
Wed Jul 22 11:06:13 -0700 2009
| link
I've noticed something similar with Safari that was driving me nuts.
After modifying the code and hitting refresh, it would not finish loading. Hit refresh again and sometimes is would complete, sometimes not. Moving the cursor to the URL and hitting enter would then usually load the new page...I had been placing my .j files within a SomethingElse folder as defined in the OBJJ_INCLUDE_PATHS. Once I moved them out and just kept them loose within the application folder the pages load fine everytime.
-
3 comments Created 6 months ago by 280northFeaturexMissing functionality: plist read/writefrom-lighthousexEverything is in title. ;)
Add initWithContentsOfURL:, initWithContentsOfFile:, writeToFile:atomically: and writeToURL:atomically: in CPArray and CPDictionary would be very useful.
This ticket has 1 attachment(s).
Comments
Missing functionality: plist read/write
initWithContentsOfURL implemented for CPDictionary in the attached patch. I suppose there’s no use for initWithContentsOfFile in cappuccino, tell me if I’m wrong.
by Farcaller
Missing functionality: plist read/write
We could just alias initWithContentsOfFile to initWithContentsOfURL. Is there a reason for puting the logic in the class method rather than the init?
It would be great to see this finished up for CPArray, and with the writeTo methods (which should just send a PUT request to the URL with the contents of the plist as the body.
It would also be interesting to see asynchronous versions of these, since synchronous requests are, generally, a terrible idea in the browser.
by Ross Boucher
NSDictionary commited at farcaller/cappuccino@8ea10ab
Any ideas how to make async version and keep it cocoa way?
-
16 comments Created 6 months ago by 280north#acknowledgedxappkitxTabView add item - labels/tabs not displayedfrom-lighthousexcant get addTabViewItem:item to function, throws Uncaught TypeError: Cannot read property ’_superview’ of null
This ticket has 0 attachment(s).
Comments
TabView add item
Could you show me the code snippet?
by Francisco Tolmasky
TabView add item
var tabset=[[CPTabView alloc] initWithFrame:CPRectMake(10,10,300,300)];
var item1=[[CPTabViewItem alloc] initWithIdentifier:@"0"]; [item1 setLabel:@"test"]; [tabset addTabViewItem:item1]; var item2=[[CPTabViewItem alloc] initWithIdentifier:@"1"]; [item2 setLabel:@"test2"]; [tabset addTabViewItem:item2];[label setStringValue:[[tabset numberOfTabViewItems] stringValue]];
[contentView addSubview:tabset]; [contentView addSubview:label];by TG
TabView add item
var tabset=[[CPTabView alloc]
initWithFrame:CPRectMake(10,10,300,300)];
var item1=[[CPTabViewItem alloc] initWithIdentifier:@"0"]; [item1 setLabel:@"test"]; [tabset addTabViewItem:item1]; var item2=[[CPTabViewItem alloc] initWithIdentifier:@"1"]; [item2 setLabel:@"test2"]; [tabset addTabViewItem:item2];[label setStringValue:[[tabset numberOfTabViewItems] stringValue]];
[contentView addSubview:tabset]; [contentView addSubview:label];-----Original Message----- From: Lighthouse [mailto:support@lighthouseapp.com]
Sent: Thursday, September 04, 2008 11:41 PM
To: Tom Giannulli
Subject: [Cappuccino #10] TabView add itemby TG
TabView add item
Ah yes it’s because the tab view item doesn’t have an associated view ([item setView:myView]). I will check whether the expected behavior should be to raise an internsalinconsistencyexception or to just show nothing in the tabview.
For right now though, if you just do [item setView:[[CPView alloc] initWithFrame:CGRectMakeZero()]]] it should work though.
by Francisco Tolmasky
TabView add item
The error is solved but the tabs/labels are not displayed
by TG
TabView add item - labels/tabs not displayed
var tabset=[[CPTabView alloc] initWithFrame:CPRectMake(10,10,300,300)];
var x=@"tab1"; var y=@"tab2"; var item1=[[CPTabViewItem alloc] initWithIdentifier:x]; [item1 setLabel:@"test1"]; [item1 setView:[[CPView alloc] initWithFrame:CPRectMake(0,0,0,0)]]; [tabset addTabViewItem:item1]; var item2=[[CPTabViewItem alloc] initWithIdentifier:y]; [item2 setLabel:@"test2"]; [item2 setView:[[CPView alloc] initWithFrame:CPRectMake(0,0,200,200)]]; [tabset addTabViewItem:item2]; [tabset setTabViewType:CPTopTabsBezelBorder]; [label setStringValue:[[tabset numberOfTabViewItems] stringValue]]; [contentView addSubview:tabset];by TG
TabView add item - labels/tabs not displayed
I confirm this as well. To be on the safe side I checked on Safari and FireFox, and neither display anything. I looked through the source a bit, and couldn’t find any trickery to force it to display the labels.
by Will Larson
TabView add item - labels/tabs not displayed
Could you try setting the tabViewType earlier, like right after you create the tab view itself. Not that this wouldn’t be a bug, just trying to identify where the problem is.
by Francisco Tolmasky
TabView add item - labels/tabs not displayed
Tried your suggestion, but isn’t working for me. Here is my source:
@@@ javascript
-(void)setupTabView: (CPView)contentView { var bounds = [contentView bounds]; var frame = CGRectMake(CGRectGetMinX(bounds)+75,
CGRectGetMinY(bounds)+100, CGRectGetWidth(bounds)-150, CGRectGetHeight(bounds)-200);tabView = [[CPTabView alloc] initWithFrame:frame]; [tabView setTabViewType:CPTopTabsBezelBorder]; [tabView layoutSubviews]; [tabView setAutoresizingMask: CPViewHeightSizable | CPViewWidthSizable];
webSearchTabItem = [[CPTabViewItem alloc] initWithIdentifier:@"web"]; imageSearchTabItem = [[CPTabViewItem alloc] initWithIdentifier:@"image"]; newsSearchTabItem = [[CPTabViewItem alloc] initWithIdentifier:@"news"];
webView = [[CPView alloc] initWithFrame:CPRectMakeZero()]; imageView = [[CPView alloc] initWithFrame:CPRectMakeZero()]; newsView = [[CPView alloc] initWithFrame:CPRectMakeZero()];
[webSearchTabItem setLabel:@"Web"]; [imageSearchTabItem setLabel:@"Image"]; [newsSearchTabItem setLabel:@"News"];
[webSearchTabItem setView:webView]; [imageSearchTabItem setView:imageView]; [newsSearchTabItem setView:newsView];
[tabView addTabViewItem:webSearchTabItem]; [tabView addTabViewItem:imageSearchTabItem]; [tabView addTabViewItem:newsSearchTabItem];
//[tabView _createBezelBorder]; [contentView addSubview:tabView]; }
@@@
by Will Larson
TabView add item - labels/tabs not displayed
Sorry for formatting: http://dpaste.com/77487/ is formatted paste.
by Will Larson
TabView add item - labels/tabs not displayed
I’ve been able to narrow down the issue (and find a work around): if you add the tabView to its parent view before adding the tab items, then it works correctly (creates labels and displays the tabViewItem’s view when the tab is selected).
However, if you add the tabViewItems before adding the tabView to the parentView, then it neither creates the labels nor displays the tabViewItem’s view as appropriate.
by Will Larson
TabView add item - labels/tabs not displayed
Great reduction WIll, I think I should have a fix for this soon.
by Francisco Tolmasky
TabView add item - labels/tabs not displayed
by Francisco Tolmasky
TabView add item - labels/tabs not displayed
The issue here is that we delay creating the tab view borders and items as long as possible, so that we prevent unnecessarily loading images that we may not need.
As a side effect, there’s a view we haven’t created yet, and we’re just sending messages to nil. This is why it’s not working. There’s also a related bug with trying to change a view out from under it later.
Essentially, the way this all works needs to be redesigned to work more like the menu system. Since it isn’t a trivial change, I’m moving it off 0.5.2. I’m also not planning on committing a stop gap measure, since the workaround is noted above. Just add items after adding the tab view to your content view.
by Ross Boucher
TabView add item - labels/tabs not displayed
I’ve been able to reproduce this in 0.7b.
Here is the sample code :
http://gist.github.com/83994by Thomas Balthazar
Didn't I already fix this?
http://github.com/nciagra/cappuccino/commit/f4aa7032f10107858a75971b6a83560bb1d09cd9
-
2 comments Created 6 months ago by 280northappkitxMain Menu Separator Orderingfrom-lighthousexThe current implementation of the main menu does not correctly order the menu items in relation to the separator.
This ticket has 0 attachment(s).
Comments
-
10 comments Created 6 months ago by 280north@boucherxfoundationx-hash is broken on CPArrayfrom-lighthousexIt breaks the contract that two arrays which are -isEqual: also need to report the same -hash value.
Patch and tests included
It’s also the same way that GnuStep and Cocotron implement this - I was quite surprised how simple they implemented it.
:)
This ticket has 1 attachment(s).
Comments
-hash is broken on CPArray
Why do both array’s need to return the same hash value? That doesn’t seem to be documented anywhere in the Cocoa docs.
This code seems incredibly dangerous to me. You’re essentially saying that all kinds of arrays that have nothing to do with each other could be considered equal. This will break anything that uses hash as a unique identifier (for example, KVO/Bindings, and I’m sure other code in Cappuccino).
by Ross Boucher
-hash is broken on CPArray
I spoke before I understood what I was talking about.
From the documentation for hash:
@"If two objects are equal (as determined by the isEqual: method), they must have the same hash value. This last point is particularly important if you define hash in a subclass and intend to put instances of that subclass into a collection."
Our implementation of hash does not behave this way. Perhaps we should consider changing our hash to become address, and re-implementing hash the Cocoa way?
by Ross Boucher
-hash is broken on CPArray
I’m not sure I understand you correctly, -[CPObject hash] does return __adress, I haven’t checked all the other objects, but all objects who redefine -isEqual: need their own implementation that matches the contract.
The one which I provided for CPArray - and I checked it against the two other Cocoa implementations I know, which do it the same way. (Also it makes sense: The Implementation needs to be FAST, and it needs to be the same when two objects are -isEqual:
I also checked against some examples on Cocoa and it behaves the same way.
by Martin Häcker
-hash is broken on CPArray
My point was that -hash works differently in Cappuccino than in Cocoa (something I previously had not realized).
We need access to __address as a method, which is what hash has been doing for us. To make -hash actually correct, we’ll need to add -address and update all of the cappuccino code that relies on hashes being globally unique.
by Ross Boucher
-hash is broken on CPArray
Too late to finish sentences...
The one which I provided does fit the contract and also behaves the same way that the others do.
by Martin Häcker
-hash is broken on CPArray
Yes, but it breaks parts of Cappuccino that expect the current behavior. For example, KeyValueObserving and CPWindow both rely on the value of -hash as a unique index into various data structures.
by Ross Boucher
-hash is broken on CPArray
Oh damn.
I just had a look around in the source and lots of objects like CPDictionary, CPData, CPDate and CPNull don’t overide -hash but should. (And most should probably also overide isEqual:)
Uh oh....
Yes, this is going to take some work.
by Martin Häcker
-hash is broken on CPArray
Can’t resist...
As a good person once said: In God we trust - for everything else we have UnitTests.
:)
by Martin Häcker
-
1 comment Created 6 months ago by 280north#needtestx@tlrobinsonxCPWebView Doesn't Play Well With CPTabViewfrom-lighthousexThis ticket has 0 attachment(s).
Comments
-
1 comment Created 6 months ago by 280north#needtestxnewlines can break copy/pastefrom-lighthousexThis ticket has 0 attachment(s).
Comments
-
1 comment Created 6 months ago by 280north#needtestx@tolmaskyxloader only works with xml plists (not 280 north plists)from-lighthousexWe assume plists are in the xml format, and thus use the .xml property of the response. The answer is more complex though, because Firefox has trouble reading plists due to their dtd, thus we force an override of mime type to text/xml with all plists, making it difficult to determine which plists are xml and which aren’t. Perhaps by examining the text response.
This ticket has 0 attachment(s).
Comments
-
2 comments Created 6 months ago by 280north#to-acknowledgexfrom-lighthousexrake test silently fails on syntax errors in teststoolsxIn this test
@@@ objj - (void) testCanSerializeJSONWithNulls {
[self assert:"null" equals:[CPString JSONFromObject: null ] message:"1"]; [self assert:null same:[[CPString JSONFromObject: null ] objectFromJSON] message:"2"]; [self fail:[[CPString JSONFromObject: [ null ] ]]; [self fail:"[[CPString JSONFromObject: [null] ]"]; [self assertFalse:true]; [self assert: [null] same:[[CPString JSONFromObject: [null] ] objectFromJSON] message:"3"]; [self assert: {foo:null} same:[[CPString JSONFromObject: {foo:null} ] objectFromJSON] message:"4"];} @@@
the line [self fail:[[CPString JSONFromObject: [ null ] ]]; makes the parser barf and the tests just don’t execute - but no error is shown.
This ticket has 0 attachment(s).
Comments
rake test silently fails on syntax errors in tests
by Thomas Balthazar
The Line indicated to have a problem is missing a closing ] . The parser does warn of this, however, if this ']' is added then the following error happens:
http://gist.github.com/211646Interestingly however if used in an application as in :
http://github.com/stevegeek/CappuccinoBugs/tree/master/i0020/
then there is no problem. -
4 comments Created 6 months ago by 280northCertain regular expressions break the parserfrom-lighthousexHi there,
I am trying to use Douglas Crockfords javascript json implementation at http://www.JSON.org/json2.js
(I am trying to reproduce another bug in the json component of cappuccino)
The problem is, that when @import this file with @import "json2.js" my unittests fail with this error message
json2.js
Expected ’]’ - Unterminated message send or array. OBJJ EXCEPTION: Expected ’]’ - Unterminated message send or array.
Name: OBJJParseException Message: undefined File: undefined Line: undefinedI haven’t yet reduced this to why it fails - but I suspect some of the more complex Regexes in there might be the source of the problem.
Please fix it!
Regards,
MartinThis ticket has 0 attachment(s).
Comments
@import "json2.js" breaks
I’d like to add that just copying the source in a obj-j file also breaks the interpreter - it seems the parser somehow gets confused on the correct javascript code in that file.
by Martin Häcker
tlrobinson
Mon May 04 18:03:53 -0700 2009
| link
There are known problems with certain regexes confusing the Objective-J parser.
A workaround is to use the "new RegExp()" form of creating regular expressions (properly escaping \ " ' etc). Alternatively you could include json2.js using a
tlrobinson
Sat Jun 06 14:16:11 -0700 2009
| link
We now include json2.js in Objective-J so I'm changing this title to the reflect the more general problem with regexes breaking the Objective-J parser.
-
0 comments Created 6 months ago by 280northFeaturexAdd identifier (name/id) to CPFlashViewfrom-lighthousexCPFlashView should have some sort of identifying attribute (name/id values) to permit accessing the file.
First reported in this thread:
http://groups.google.com/group/objectivej/browse_thread/thread/db720baa4d6eec19
This ticket has 0 attachment(s).
Comments
-
3 comments Created 6 months ago by 280north#to-reviewxFeaturexCPFlashView should support adding parameters and Flash variablesfrom-lighthousexThis was mentioned in ticket #112, but ticket #112 is about 2 different things, so I thought it was a good thing to split them.
This ticket has 0 attachment(s).
Comments
CPFlashView should support adding parameters and Flash variables
I’m working on adding this functionality in.
by Jesse Ross
CPFlashView should support adding parameters and Flash variables
http://github.com/jross/cappuccino/commit/2f6565a5faf047d92a0e46dd0fc83858a4e1f066
http://github.com/jross/cappuccino/commit/7e3ac4824882cedac5a8121a4a716e016b3acdc7 http://github.com/jross/cappuccino/commit/a357dc294f372ea6c19a249e2b7db57fc35cfadaby Jesse Ross
CPFlashView should support adding parameters and Flash variables
- http://github.com/jross/cappuccino/commit/2f6565a5faf047d92a0e46dd0fc83858a4e1f066
- http://github.com/jross/cappuccino/commit/7e3ac4824882cedac5a8121a4a716e016b3acdc7
- http://github.com/jross/cappuccino/commit/a357dc294f372ea6c19a249e2b7db57fc35cfada
by Jesse Ross
-
9 comments Created 6 months ago by 280north#needanswerx@tolmaskyxPartial, working CPScanner and CPCharacterSet.from-lighthousexCPScanner and CPCharacterSet are useful in many situations, but are missing. Attached is a skeleton implementation of both of them that, while not implementing all methods of the corresponding Cocoa classes, is already useful.
See the comments in the code for more details.
This ticket has 1 attachment(s).
Comments
Partial, working CPScanner and CPCharacterSet.
Sorry I haven’t gotten around to reviewing/checking this in yet, I’ll try to do so tomorrow (today).
by Francisco Tolmasky
Partial, working CPScanner and CPCharacterSet.
by Francisco Tolmasky
Partial, working CPScanner and CPCharacterSet.
Hey millenomi, could you do a pass over this and make it so it conforms to our new style guidelines ( http://cappuccino.org/contribute/coding-style.php ). If not I could do so, but I figure you’d prefer to do it yourself. Also, before we get this in we’ll need you to sign a contributor agreement, which we should hopefully have by the end of today or tomorrow.
by Francisco Tolmasky
Partial, working CPScanner and CPCharacterSet.
Any update on this?
by Ross Boucher
Partial, working CPScanner and CPCharacterSet.
This patch would be very useful with some trivial fixes in the following methods of CPScanner.
1/
-(BOOL)_performScanWithSelector:withObject:into: (see comments in the code about how to handle references)2/
- (CPString) scanUpToString:(CPString)s should be rather - (BOOL) scanUpToString:(CPString)s intoString:(CPString)value and set the captured string into value (value is a reference).millenomi, we need you, please come back to finish this important contribution.
by cacaodev
CPCharacterSet and CPScanner are in this repository : http://github.com/cacaodev/cappuccino/tree/master
It's mainly working. Missing methods are included in the file in case you want to finish the job.
I know this sounds obnoxious, but one of the things needed here is some style improvements. In particular, spacing is pretty inconsistent, as are brackets, same line returns with single if statements, some more minor stuff. Accessing window explicitly is generally not a great idea (window._CPCharacterSetTrimAtBeginning = ...).
Francisco can probably comment better on more technical concerns.
I fixed the same line return (or anything) with single line statement. Can you explain to me what is the problem with spacing and brackets because i don't see. I'm following the rule "one bracket = one line" except maybe for one while loop. Also accessing global from window seems to be a workaround done by the original author (millenomi). He says that globals are not exposed to other files. Maybe because globals have to be at the beginning of the file ?
Well, for example, many lines use 2 spaces for a tab, while others use 3, and still others use 4. Some lines are not properly indented at all. Cappuccino prefers that all code be properly intended, using 4 spaces in place of a tab.
Global variables are accessible outside of the scope of the file, var'd variables are not. Putting a var indicates file level scope, while leaving the var out will make it global.
I'm also not sure what those two variables are for. They have an underscore, indicating that they aren't meant to be "public", and yet they also need to be global? I don't see a corresponding NS* in the Cocoa docs, but maybe I just missed it.
-
1 comment Created 6 months ago by 280northappkitxsetAllowsMultipleSelection: and setSelectable: do not allow multiple selections in CPCollectionViewfrom-lighthousexComments
setAllowsMultipleSelection: and setSelectable: do not allow multiple selections in CPCollectionView
toggleIndexInSelection:
http://github.com/camwest/cappuccino/commit/04abd8bad1f3ab870e7d01287de04c7434aebb6e
selectRangeFromIndex:toIndex:
http://github.com/camwest/cappuccino/commit/8a471cc838c029fd0c90e1b13012214a720930e9
Minor Code Tweaks:
http://github.com/camwest/cappuccino/commit/e674dbd99629504502f7c3ddf974ce7a944cdb5e
http://github.com/camwest/cappuccino/commit/7bc879b20d1e4627a1cc178cc4c221c94377bf7bby Cameron Westland
-
1 comment Created 6 months ago by 280north#to-reviewxappkitxsetAllowsMultipleSelection: and setSelectable: do not allow multiple selections in CPCollectionViewfrom-lighthousexThis ticket has 0 attachment(s).
Comments
-
0 comments Created 6 months ago by 280northappkitxFeaturexImplement CPPopUpButton's -sizeToFitfrom-lighthousex -
5 comments Created 6 months ago by 280north#to-acknowledgex@boucherxappkitxCPTextField focus doesn't work through different windowsfrom-lighthousexThe new focus rings are great. But, if you have a text field in one window (for example, the menu bar), and another text field in another window, there is an issue. Focus the first text field in the menu bar. Then, while it is still focused, focus the second text field in the other window. Both of them will now be "focused", with focus rings, and neither (sometimes one) will allow input.
This ticket has 1 attachment(s).
Comments
CPTextField focus doesn’t work through different windows
Attached test case.
by nciagra
CPTextField focus doesn’t work through different windows
Temporary fix committed.
by Ross Boucher
CPTextField focus doesn’t work through different windows
by Ross Boucher
Commited to http://github.com/stevegeek/CappuccinoBugs , however the behaviour seems to now have been corrected. Unless this is only the temporary fix mentioned above.
-
1 comment Created 6 months ago by 280north#to-reviewxappkitxCPControl : implement setTootTip:from-lighthousexCould be something like this:
@@@ javascript
-(void)setToolTip:(CPString)aToolTip {
if (_toolTip == aToolTip) return; _toolTip = aToolTip;if PLATFORM(DOM)
_DOMElement.title = aToolTip;endif
}
@@@
Maybe we need test cases for critical situations like when a view with a toolTip displayed is removed from the superview ...
This ticket has 0 attachment(s).
Comments
-
6 comments Created 6 months ago by 280north#to-reviewx@boucherxfoundationxCPPredicate suitefrom-lighthousexAlmost complete except:
- predicateWithFormat: > relies on CPScanner - Some new 10.5 methods - Some functions in CPExpression_function.j - MATCHES[d] (regex match diacritic insensitive) - expressions constants are not castedNeeds a lot of testing. A basic test case will follow.
This ticket has 5 attachment(s).
Comments
CPPredicate suite
Very basic Test case for CPPredicate.
Creates various CPExpression (constant, keypath, function, aggregate)
Creates a CPCompoundPredicate from 2 CPComparisonPredicate
Filters an array with the predicate.by cacaodev
CPPredicate suite
Improved version.
- fixed bugs in CPComparisonPredicate evaluation for strings - Support for CPMacthPredicateOperatorType (javascript regex) - Partial support for CPDiacriticInsensitive option. Not covering all diacritics. - cleaned code in evaluation of compound predicates. - Added aggregate expressionComing next: unionset, minusset, subquery expressions. (10.5 new methods in NSPredicate).
Feel free to implement predicateWithFormat: . We need a parser for that so it could be CPScanner or another way to parse (lex ?).
I will post a ojunit test later if needed.
by cacaodev
CPPredicate suite
This is the last version with a lot of code style cleaning.
Also supports for unionset, intersectset, minusset.
predicateWithFormat: still missing.These are raw files are in a zip. I can also give you a patch against Foundation but anyway you will have to add import directives in Foundation.j yourself because I’m not sure what’s the right way.
Included: CPPredicateTest.j importing CPPredicate from Foundation.
If you have any comments, even code style, I prefer that you post it bellow.
by cacaodev
CPPredicate suite
An updated version of CPPredicate & al with a test case have been pushed into my fork.
http://github.com/cacaodev/cappuccino/tree/master
by cacaodev
CPPredicate suite
Please forget the previous comment.
Here is the commit url in my fork:
http://github.com/cacaodev/cappuccino/commit/6ecc557abb06a21f044778bc3a114d1f2ad8c1c4And attached is a new patch matching this commit:
by cacaodev
Added documentation for CPPredicate, CPComparisonPredicate, CPCompoundPredicate and CPExpression.
-
0 comments Created 6 months ago by 280north#to-acknowledgexCPEvent's buttonNumber is not fully implementedfrom-lighthousexThe buttonNumber message returns the value of _buttonNumber, which doesn’t exist in the CPEvent class.
Looking at mouseEventWithType, I notice that it probably lacks a buttonNumber param.
This ticket has 0 attachment(s).
Comments
-
0 comments Created 6 months ago by 280northappkitxFeaturexMenu Bar Items Should Respond To MouseMoved Eventsfrom-lighthousexNot sure how difficult this would be, but it would be very cool if menu bar items could activate if the user moves the mouse over them when the menu bar is currently active. Like in Cocoa.
This ticket has 0 attachment(s).
Comments
-
0 comments Created 6 months ago by 280northappkitxFeaturexPopUpMenu Submenus need to be implementedfrom-lighthousexPretty self explanatory, submenus for pop up menus need to be implemented.
This ticket has 0 attachment(s).
Comments
-
Having a semi-transparent CPToolbar, CPPopUpButton button and such to go along with the HUD windows will be great.
This ticket has 0 attachment(s).
Comments
-
0 comments Created 6 months ago by 280north@tolmaskyxFeaturexfunction args should come before ivars in the scope chainfrom-lighthousex -
3 comments Created 6 months ago by 280northFeaturexNeed for a CPOpenPanelfrom-lighthousexIt would be useful to have an implementation of NSOpenPanel in Cappuccino. I can see two scenarios where they would be useful.
One is to let the user select a file on their local file system. The app could upload the file to a server and then make it available to the user.
Or the panel could be used to select a file on a remote server. If the user has a remote library of files, like 280 Slides does, this would be a way to select one of these files for opening.
This ticket has 0 attachment(s).
Comments
Need for a CPOpenPanel
This is a challenging task. The first goal is essentially impossible, at least, sort of.
Web apps can’t talk to the native file system, and that isn’t likely to change in the near future. The only exception is using the "File Upload" mechanism (input type="file").
We do need to build support for this into Cappuccino (we have it in 280 Slides, and have the sample code in our gist pastebin). However, beyond that, there’s essentially nothing we can do with respect to local file system files.
As for a generic open panel for remote server files, this is a worthwhile goal, but it isn’t obvious how it would work. The interaction is very server component specific. How do I get a list of available files? Do I support folders? Are there previews for these files available? Metadata?
It may be that we’ll make a set of default assumptions, built a somewhat generic looking open panel, and then see where it takes us, but right now I think the project is better served by focusing on slightly more generic tasks (specifically ones that don’t require us to worry about server interaction).
All that being said, if someone wants to volunteer to work on this, then that’s great. I’m happy to think things through with someone.
We can also consider releasing the 280 Slides open panel as sample code. It would not be directly reusable (its fairly specifically oriented towards slides), but it would be a reasonable starting point for anyone.
by Ross Boucher
Need for a CPOpenPanel
The Import Button on the 280slides.com does not seem to work for Opera.
by Thrinz
-
5 comments Created 6 months ago by 280north#acknowledgedx@tolmaskyxappkitxCPSplitView doesn't honor splitView:constrainMinCoordinate:ofSubviewAt: when resizing windowfrom-lighthousexIf I have the following method in a CPSplitView delegate:
@@@ - (int)splitView:(CPSplitView)splitView constrainMinCoordinate:(int)minCoord ofSubviewAt:(int)index {
if (index == 0) { return 200; } else { return minCoord; }} @@@
it correctly keeps the subview at index 0 from ever being less than 200 pixels wide when moving the splitter around.
But if I resize the window and make the window smaller, the subview does get resized with a width less than 200 pixels...
I added a log message to the above method to check whether it ever gets called. When resizing the window, the method never gets called. It gets called plenty when moving the splitter.
This ticket has 1 attachment(s).
Comments
CPSplitView doesn’t honor splitView:constrainMinCoordinate:ofSubviewAt: when resizing window
The docs on Apple’s page say the following:
This method is invoked before the NSSplitView begins tracking the cursor to position a divider. You may further constrain the limits that have been already set, but you cannot extend the divider limits. proposedMin is specified in the NSSplitView’s flipped coordinate system. If the split bars are horizontal (views are one on top of the other), proposedMin is the top limit. If the split bars are vertical (views are side by side), proposedMin is the left limit. The initial value of proposedMin is the top (or left side) of the subview before the divider. offset specifies the divider the user is moving, with the first divider being 0 and going up from top to bottom (or left to right).
So it sounds like it should only be called during repositioning of the divider. Could you possibly do a test against Cocoa to see whether this is actually the case?
by Francisco Tolmasky
CPSplitView doesn’t honor splitView:constrainMinCoordinate:ofSubviewAt: when resizing window
Ok, I wrote a little cocoa app and this method does get called when the window is resized as well as when the divider is repositioned.
I attached the project if you care to see for yourself...
by Patrick Crosby
CPSplitView doesn’t honor splitView:constrainMinCoordinate:ofSubviewAt: when resizing window
Cool, I’ll try to fix this tomorrow then
by Francisco Tolmasky
CPSplitView doesn’t honor splitView:constrainMinCoordinate:ofSubviewAt: when resizing window
This hasn’t been fixed in 0.7b yet.
Here is a test case :
http://gist.github.com/83999by Thomas Balthazar
http://github.com/stevegeek/CappuccinoBugs/tree/master/i0041/ I have commited the test here, and I do not see the problem anymore
-
0 comments Created 6 months ago by 280northFeaturexSupport Rich Text copy/pastefrom-lighthousex -
1 comment Created 6 months ago by 280northFeaturexImplement revertFromSaved:from-lighthousexThis ticket has 0 attachment(s).
Comments
-
2 comments Created 6 months ago by 280north#to-reviewx@tolmaskyxappkitxCPFlashView <embed> and <object>from-lighthousexCurrently, CPFlashView orders its elements as the following:
DOMElement.appendChild(DOMObjectElement);
DOMElement.appendChild(DOMEmbedElement);The comment above these lines indicates that this is to maintain compatibility with IE. However, Ross and I agree that this seems incorrect. I’m not sure what the proper way to deal with IE is, but I have personally always seen the embed as a child of the object, not a sibling:
DOMElement.appendChild(DOMObjectElement);
DOMObjectElement.appendChild(DOMEmbedElement);This ticket has 0 attachment(s).
Comments
CPFlashView and
I’ve started some tests on this ticket.
Here are the results of my tests :The flash is correctly displayed in IE7 with the elements ordered as follow :
DOMElement.appendChild(DOMEmbedElement);
DOMElement.appendChild(DOMObjectElement);
I agree that the embed tag should be a child of the object tag.
Interesting infos can be found here here :
http://www.alistapart.com/articles/flashembedcagematch/So I tried to order the elements like this :
DOMElement.appendChild(DOMObjectElement);
DOMObjectElement.appendChild(DOMEmbedElement);
But IE7 returns the following error : Invalid argument line 572 Char 5, which corresponds to this line :
DOMObjectElement.appendChild(DOMEmbedElement);
What do you guys think about it?
What should we do?by Thomas Balthazar
-
2 comments Created 6 months ago by 280north#acknowledgedx@tlrobinsonxTextMate bundle doesn't recognize CPCollectionViewfrom-lighthousexPretty minor thing, but I just noticed it. Thanks.
This ticket has 0 attachment(s).
Comments
TextMate bundle doesn’t recognize CPCollectionView
by Francisco Tolmasky
-
1 comment Created 6 months ago by 280north#acknowledgedx@tlrobinsonxSpace in Path Name for Bakefrom-lighthousexI have the following as the path in bakefile
"path" : "/Users/xxxx/Documents/Code/Javascript Projects/Cappuccino/ testapp/testapp"
i also tried
"path" : "/Users/xxxx/Documents/Code/Javascript\ Projects/ Cappuccino/testapp/testapp"with no luck...
The error i am getting is the following
2008-11-02 19:14:49.469 Cappuccino [warn]: exec: rsync: link_stat "/
Users/xxxx/Documents/Code/Javascript" failed: No such file or
directory (2)This ticket has 0 attachment(s).
Comments
-
1 comment Created 6 months ago by 280north#acknowledgedx@tolmaskyxAdd references to Objective-J @reference?from-lighthousexIt would look something like this:
- (void)myMethod:(ref CPString)aString
{
aString("new value")
}
[Object myMethod:@reference(myString)];
@dereference would allow you to talk to it:
[@dereference(stringReference) length]
Essentially, @reference(X) is a macro that becomes
function (value) { this.set = function(x) { X = x; } this.get() { return x; } }
@dereference(X) is a macro that becomes
X.get()
More or less.
This ticket has 0 attachment(s).
Comments
- (void)myMethod:(ref CPString)aString
{
aString("new value")
-
2 comments Created 6 months ago by 280north#acknowledgedxImprove the parser to detect syntax errorsfrom-lighthousexI can throw a lot of invalid syntax into a .j file and it will run without even a warning. Surely syntax errors should be of the highest possible severity?
It’s quite scary to think that a well meaning parser can discard things I write in my source code without even mentioning it.
It also makes me wonder if the parsing could be a lot more efficient.
Would you guys like some input in this area? I’m not an expert but I know a little bit about LALR(1) grammars and lexical analysis (another area of the source that looks like it could use some improving - long piped regexes are generally slower than checking several smaller regexes and switching states).
Clearly it’s a hugely complex area but it’s certainly something that needs to be as close to 100% spot-on as possible :)
This ticket has 0 attachment(s).
Comments
Improve the parser to detect syntax errors
By all means take a stab at it.
by Francisco Tolmasky
-
More CRUD or Information oriented View over CPCollectionView to be backed by a Model
This ticket has 0 attachment(s).
Comments
-
3 comments Created 6 months ago by 280north#needanswerxObjective-J preprocessor chokes on certain RegExp literalsfrom-lighthousexThis ticket has 0 attachment(s).
Comments
Objective-J preprocessor chokes on certain RegExp literals
(from [abbbc6e]) Replaced regex literals with RegExp objects, due to bug [#117] http://github.com/280north/cappuccino/commit/abbbc6e8f09b9bee14f7b794c83712492ee1cffd
by admin (at 280north)
Objective-J preprocessor chokes on certain RegExp literals
Yes it does
by Francisco Tolmasky
-
3 comments Created 6 months ago by 280north#needanswerxappkitxCPWindow setMinSize does not set overflow properlyfrom-lighthousexCPWindow includes utilities to setMinSize and setMaxSize. While these seem to work correctly, when the user resizes the window to less than it’s minimum size, the overflow of the window/contentView should be changes to add browser scroll bars into the window.
This ticket has 0 attachment(s).
Comments
CPWindow setMinSize does not set overflow properly
CPWindow can not (or at least should not be able to) be resized smaller than its minimum size, or larger than its maximum size. I’m not sure what you’re proposing.
by Ross Boucher
CPWindow setMinSize does not set overflow properly
Sorry, I meant to specify this is relating only to the bridge window. By default, you remove the browsers scroll bars. However, I feel that the bridge window’s setMinSize should implement special behavior to add the browser’s scroll bars back if the user resizes their browser to less than the minimum size (which is not prevented by setMinSize).
by nciagra
-
2 comments Created 6 months ago by 280north#to-acknowledgexappkitxCan't organize Code into subfoldersfrom-lighthousexHi there,
I just tried moving the app delegate into a subfolder (Source) as a first step to get all the source out of the root of the project (organisation is good).
This doesn't seem to work however. When I move the AppController.j (which contains my app delegate) into the subfolder, and load it in main.j like this
-- snip -- @import "Source/AppController.j" -- snap --
I see from the output in the Safari Debugger that it does get loaded. However after that main does not get called.
-- snip -- function main(args, namedArgs)
{console.log("before main") CPApplicationMain(args, namedArgs); console.log("after main")} -- snap --
i.e. I don't get any output there.
Moving other classes into Source doesn't seem to work either.
I completely don't have any ideas why this might be happening. Perhaps it's something with paths being interpreted relative where they shouldn't, but ... :)
So, please fix it.
Regards,
MartinThis ticket has 0 attachment(s).
Comments
We had similar problem in WebKit nightly but we were able to fix it by creating Info.plist file in the directory( in your case Source) without any key/value pairs to circumvent the problem. Which browser are you using?
I would love to see this fixed, too. Subdirectories work in development, but not after building the app for Release.
In the meantime, here's a fix:
- Edit the project's Rakefile. Add your subdirectories to t.sources ("Classes/*.j")
- Add the subdirectories to OBJJ_INCLUDE_PATHS in index.html: ["Frameworks", "Classes"]
- In your code, import your classes without the directory name: @import "MyClass.j"
Finally, "rake CONFIG=Release" and you'll have a packaged app that loads the files properly.
-
2 comments Created 6 months ago by 280north#needanswerxMultiple non Javascript-native instance variable declarations per-line don't workfrom-lighthousexCappuccino appears to have a problem with having instance variables declared in a class where the type is non Javascriopt-native and you specify multiple variable declarations per line. For example:
@@@ @implementation NavigationBar : CPView {
int _type, _fieldPadding; id _backButton, _forwardButton;} . . . @@@
will result in a ’backButton not defined’ error the first time backButton is referenced at runtime. There are no problems accessing either type or fieldPadding, which are int’s. It also doesn’t appear to matter whether the offending variables are declared as ’id’s or some other non Javascript-native type.
Changing this to:
@@@ @implementation NavigationBar : CPView {
int _type, _fieldPadding; id _backButton; id _forwardButton;} . . . @@@
alleviates the problem.
This ticket has 0 attachment(s).
Comments
Multiple non Javascript-native instance variable declarations per-line don’t work
This is actually due to us not supporting the comma notation for multiple declarations of the same time. It’s surprising that any of them worked.
by Francisco Tolmasky
-
This is likely a bug in _CPImageAndTitleView. It's triggered by calling [CPMenu setMenuBarVisible:YES] and then [CPMenu setMenuTitle:"foo"]. Reverse the order, and the shadow is the correct color.
Comments
-
0 comments Created 6 months ago by dwt\R as key equivalent on CPButton doesn't get through nib2cibFeaturexHi there,
I've set a button in a form as the default button for that window by setting it's key-equivalent to \R in IB. However, after converting the xib with nib2cib, the button is not the default button anymore.
Regards,
MartinComments
-
1 comment Created 6 months ago by cacaodevDisabled CPMenuItem should have gray textFeaturexCurrently, a CPMenuItem can be disabled with [item setEnabled:NO] but it's font color remains black instead of gray.
Comments
Fixed. It was just a wrong color name (dark gray instead of light gray).
commit : http://github.com/cacaodev/cappuccino/commit/75781b506a6a83802d61f592218a3bff67c6d309
-
When scrolling a CPWebView that is inside a CPScrollView brief artifacts will appear if there are any views that are out of the scrolling area and the webview should be clipped by when scrolling. This issue has only been noticed in FF for Windows and Linux and does not have any problems in FF for OS X.
Here is a video of the bug: http://www.youtube.com/watch?v=08VN3-S2kgI
The video shows a brief glimpse of the problem, but due to the frame rate does not show how prevalent the artifacts really are.
This was all using 0.6 code. I will let you know if the problem still persists when I move to 0.7b.
Testing code: http://gist.github.com/110148
Comments
-
@import "NonExistingFile.j" sends ojtest into an infinite loop / recursion
0 comments Created 6 months ago by dwtWell it does. This totally braks rake test, and also calling ojtest directly.
What it should do is display an error message that the file in question could not be found.
Regards,
MartinComments
-
ojunit is missing assertions for exceptions and regexes
0 comments Created 6 months ago by dwtso I added them (after using them for a while internally)
Patches here: dwt@3471747
and here: dwt@fe8b294Comments
-
2 comments Created 6 months ago by j4johnfoxpress does not work when using cibs@tlrobinsonxusing press --flatten, I find a few problems:
1) cib file loading doesn't work:
- [CPBundle loadCibNamed:owner:loadDelegate:] unrecognized selector sent to class 0x000026
2) All .j files (e.g. individual .j files in my project) are copied, as well as the original .j files from AppKit and Foundation frameworks (e.g. ~/browser.platform).
Aside from the cib file problem, the app does run.
Comments
tlrobinson
Sat Jun 13 16:46:16 -0700 2009
| link
The problem is that press is not aware of the classes used in cibs, so they may be stripped.
Workarounds:
use the "--nostrip" option if you only care about flattening, not reducing file size
explicitly import all classes used in the cibs, possibly at the top of AppController.j (don't just import "AppKit/AppKit.j" since it is ignored)
-
Fix well-formed issues - Browser detection
0 comments Created 5 months ago by timperrettCorrect the frequent errors with "not well-formed" appearing in browser consoles by adding some type of client checking code that means these errors do not occur.
Comments
-
Currently CPCollectionView arranges its items by starting at the top-left, filling each (fixed width) row left-to-right and adjusting its height as necessary to fit in the required number of rows.
As far as I can gather Cocoa doesn't have this either but it would be useful to have an alternative mode which would render items top-to-bottom, filling fixed-height columns and adjusting the width to fit.
This would then allow it to be used for rendering lists of items which scroll horizontally.
The only required change to the interface would be an additional accessor to set/get the "grow" direction.
I'll have a go at this myself if I get the time.
Comments
I've commited a patch for this at: http://github.com/maport/cappuccino/commit/93cc5700c8e39e84fded1a4b4ba3d69f03a12dd8
This adds a new orientation property which can be set to
CPCollectionViewHorizontalOrientationto "orient" the view horizontally rather than the standard vertical arrangement:- (void)setOrientation:(CPCollectionViewOrientation)anOrientationIn this orientation the view has fixed height, items are arranged in columns starting on the left and the width is varied.
It is particularly useful if you want to render a one row list that scrolls horizontally.
The patched CPCollectionView should be completely backward compatible and users who don't use
setOrientationshouldn't encounter any differences. However I have deprecatedsetVerticalMarginin favour of a newsetDivisionMarginmethod since the "vertical margin" is the margin between rows in the standard vertical orientation but becomes the margin between columns in the the horizontal orientation.Any better suggestions than
setDivisionMarginwelcome; a "division" is the general term I am using to represent a row or column.
-
Vertical splitter behavior when using Firefox 3.0.10 (on Win XP)
1 comment Created 5 months ago by cwsIf I open following website created with cappuccino:
http://www.nice-panorama.com/Programmation/cappuccino/Browse-Cappuccino-Tutorials.htmlThe vertical splitter can be moved to the right only, if the mouse is only hitting the splitter control. If I move above the right subview, it stops resizing. I can only escape, if I click the mouse button or if I move the mouse back above the splitter control.
Comments
-
Working on a CPSound class to match the NSSound from Cocoa. Tell me if it's not needed!
Comments
What is the status of CPSound? I would say this is a crucial part of some application. I took a look at your branch and looked through CPSound.j but it's hard to tell what's missing in it (if anything).
I just uploaded the latest changes to my own branch. I have implemented most of the useful stuff. I currently use quicktime, and the audio tag if QT is not supported. However, more addons should be added. Also the pause/stop behaviour seems to be different depending on what tag is used. Also I do not know what browsers this works in, would help if somebody checked.
-
CPButtonBar rendered without a skin (by default, using aristo)
4 comments Created 5 months ago by cwsI figured out that there is a aristo skin for CPButtonBar, but it does not appear.
Any idea how to activate it?I used following code:
@import <Foundation/CPObject.j> @implementation SideBarView : CPView { } - (id)initWithFrame:(CGRect)aFrame { if(self = [super initWithFrame:aFrame]) { var bounds = [self bounds]; [self setBackgroundColor:[CPColor colorWithRed:213.0/255.0 green:221.0/255.0 blue:230.0/255.0 alpha:1.0]]; var buttonbar = [[CPButtonBar alloc] initWithFrame:CGRectMake(0, 30, 200, 26)]; [buttonbar setBackgroundColor:[CPColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0]]; [buttonbar setFrameOrigin:CGPointMake(0,CGRectGetHeight(bounds)-26)]; //[buttonbar setFrameSize:CGPointMake(CGRectGetWidth(bounds),26)]; [buttonbar setAutoresizingMask:CPViewWidthSizable | CPViewMinYMargin]; [self addSubview:buttonbar]; var button1 = [[CPButton alloc] initWithFrame:CGRectMake(10, 1, 30, 24)]; [button1 setTitle:@"+"]; [buttonbar addSubview:button1]; } return self; } @endby the way, if I uncomment following line of code, the CPButtonBar disappears somehow:
//[buttonbar setFrameSize:CGPointMake(CGRectGetWidth(bounds),26)];In gerneral: Is there a tutorial how to deal with the styles/themes/skins added with release 0.7?
Comments
chandlerkent
Sat Jun 06 10:14:44 -0700 2009
| link
This is a question and not a bug report. I suggest it is removed.
I suggest to keep it here as a bug, because it makes no sense to render this buttonbar without a skin by default!
I found out, that it renders, if I change size of the parent CPView (which is embedded via vertical scroller). If I do resize the scroller, the skin appears. But it is white / without skin, before I do this.
Btw: It is not possible to resize the scroller, by using the two lines on the right hand side of the CPButtonBar.
Any idea?
-
CPScrollView clips incorrectly when attempting to add items in its document view
0 comments Created 5 months ago by saikatWhen a CPScrollView is set up to use a CPCollectionView and new items are added to the CPCollectionView which are set to be editable upon addition, the scroll view does not adjust correctly. See the comments in the code below for more details.
Comments
-
Selecting an added item to CPCollectionView does not work
0 comments Created 5 months ago by saikatI am trying to select the text of a text field that is being added to a collection view. It doesn't work, however, when attempting to do this after a reload of the content. For more details, look at the comments in the code.
http://dl.getdropbox.com/u/211886/CPCollectionSelectOnAddBug.zip
Comments
-
Vertical Line in InterfaceBuilder doesn't work in nib2cib
0 comments Created 5 months ago by [deleted user]nib2cib can't convert a Vertical Line from IB.
workaround: I use a Image with 1x1 pixel, and bring it to the line I need.
Comments
-
Buttons lose their height, after nib2cib
0 comments Created 5 months ago by [deleted user]I have a made a Button in InterfaceBuilder,
deactivate the borders and make in heighter.Works in IB and Obj-C, but convert with nib2cib,
it looks in Safari straingh: the height isn't bigger,
and the button-tittle is on the basement.Comments
-
The ComboBox in IB doesn't work with nib2cib
0 comments Created 5 months ago by [deleted user]The ComboBox in IB doesn't work with nib2cib.
Comments
-
2 Backgroundcolor - Problems:
a)
if your window is 800x600 pixels, and you use a backgroundcolor in the AppController.j,
the hole page in safari is blue, instead of only the 800x600 pixels.b)
if you set the
[theWindow setFullBridge:YES]; to NO or comment it out with // the backgroundcolor is gone. No BGcolor anymore there.workaround: i use a 1x1 pixel with the color, made an image in interfacebuilder about the hole window and send it to back.
Comments
I don't understand this bug. Could you please provide a sample application that exhibits the problem?
[deleted user] Sat May 30 14:11:06 -0700 2009 | linkok, no problem. :)
example for a)
[i delete the link, because of high traffic]This is the example, that the backgroundcolor make all to blue, just not the x to y - size of the webapp.
in the .j, i make a comment
//the background-color error to find easier the bg-color - entry.b)
i add to same code the setFullBridge:NO,
and the backgroundcolor is gone.examplecode:
[i delete the link, because of high traffic]EDIT: [i delete the link, because of high traffic - if the examples needed again, please contact me]
hey can we please have these tests again, you can paste them as gists http://gist.github.com/ to save your traffic.
thanks
-
CPWebView should contain a property to resize only Horizontally, Vertically, or both. Currently, both a vertical and horizontal resize happens when the scroll mode is CPWebViewScrollAppKit.
Secondly, The scroll mode should not necessarily be the delimiting factor on whether a CPWebView resizes itself. The WebView should be able to resize itself without containing a scroll area.
Think of this scenario: Someone wants to load multiple web views in a list like format and does not want each web view to contain a scroll area based on the WebView's initial size. Rather they want the full WebView (resized and all after the load) to be present without scroll bars and scrolling will be managed at a higher containing view.
Please let me know if you think I am entirely off with this behavior. I have no problem working on a patch for this.
Comments
-
Title is pretty self-explanatory. BlendKit is not being linked when using 'capp -f -l'.
Comments
-
The thing that doesn't work is to import empty files. In a real life case this won't happen (at least it happened once ;-)), but it's a simple bug. I will add this to the bug list.
If you add at least a carriage return to the file everything works fine.
Comments
-
When you press the return key for the default button of a window the button should momentarily go to the pressed state.
Comments
-
Add signatureForMethod implementation (stated as "// FIXME: We need to implement method signatures" in CPObject).
It seems required for interoperability with languages that are less abstract (more restrictive) than ObjJ : for example Java reflection requires to know exactly a method's parameters types (classes) to retrieve a Method definition object. With ObjJ/ObjC we can just invoke a method with performSelector, then we just need to know the selector name (not its IMPL and parameters types).Java method parameters types can be determined from passed arguments objects, however if they are null we have no way. Having the ObjJ method signature, we could pass some null constants (carying the class information) for null parameters.
Comments
Objective-J runtime Method js object holds the selector (name), IMP (js function) and types of the parameters (not managed for now).
So the runtime does the job : when sending a message on a receiver object, it searchs in its methods for a method with same selector/name, and types (not done for now) and returns the function. It is the same in ObjC.In Java the programmer has to do that, either by static/compiled call to the function (passing parameters objects values), or by using reflection APIs (pass the parameters types in a Class array).
-
CPWebView does not resize when window is resized
5 comments Created 5 months ago by glejeunesetAutoresizingMask: with CPViewHeightSizable | CPViewWidthSizable does not seem to work.
Example : http://gist.github.com/123554
Comments
chandlerkent
Sat Jun 06 10:09:52 -0700 2009
| link
The above example shows more than just the bug. Here is a new example that only contains the bug:
Tested in the release version of 0.7.
eboehnisch
Tue Jun 30 06:16:38 -0700 2009
| link
I second this bug report. I am loading a CPWebView into a CPSplitView and when the user changes the position of the CPSplitView divider or resizes the window, the CPWebView resizes correctly but not its content frame.
eboehnisch
Tue Jun 30 06:54:22 -0700 2009
| link
I tried to circumvent the problem by manually adjusting the width and height of the surrounding like with:
document.getElementsByName("My Web Vew")[0].parentNode.style.heightbut the original implementation actually does adjust these two attributes but always only to the original size, not the new size.
eboehnisch
Tue Jun 30 08:52:10 -0700 2009
| link
It seems that the _resizeWebFrame method does a bit more than just resizing the web frame, and at least here this does not work as expected. I have overwritten this method with the simple one:
- (BOOL)_resizeWebFrame { [super _resizeWebFrame]; [_frameView setFrameSize:[_scrollView bounds].size]; }The added line overwrites this line in the original method which seems to be there to enable Cappuccino show the CPWebView with its on scroll bars instead of the browsers':
[_frameView setFrameSize:CGSizeMake(width, height)];This could be a workaround until the original idea behind that code works as intended.
jfahrenkrug
Tue Sep 15 01:28:28 -0700 2009
| link
I got this to work in http://github.com/jfahrenkrug/MapKit and http://github.com/jfahrenkrug/MapKit-HelloWorld
Basically what you need to do is two things:
@implementation CPWebView(ScrollFixes) { - (void)loadHTMLStringWithoutMessingUpScrollbars:(CPString)aString { [self _startedLoading]; _ignoreLoadStart = YES; _ignoreLoadEnd = NO; _url = null; _html = aString; [self _load]; } } @endThat will give you a way to load html into your webview without messing up the scrollbars. And overriding
_resizeWebFramelike so did the trick for me:- (BOOL)_resizeWebFrame { var width = [self bounds].size.width, height = [self bounds].size.width; _iframe.setAttribute("width", width); _iframe.setAttribute("height", height); [_frameView setFrameSize:CGSizeMake(width, height)]; }- Johannes
-
Fixed incorect menu positioning when the superview frame != window frame
Fixed search/cancel button autoResizingMask. Buttons where not hooked to the left/right edges
Commit : http://github.com/cacaodev/cappuccino/commit/2c7876b015d952f40d0aa8c88ce0ce61e7aee5c1
Comments
- Special menu items of searchMenuTemplate are now correctly handled
- Implemented autosave feature with CPCookie
- Reorg some methods to allow easier subclassing
- Removed the default template (when no template is set) to match cocoa impl
Commit:
http://github.com/cacaodev/cappuccino/commit/13318c92f8d69d1a80780f618ac998768b0153a2Workaround for a bug with CPEvent timestamp
in Firefox that was causing the menu to stay open.Commit:
http://github.com/cacaodev/cappuccino/commit/a7feaf4c1b3b848f59a380145372f6f1ac3aa708 -
There is no good way to handle keyDown events for a text field
0 comments Created 5 months ago by saikatI want to create a text field that handles the up arrow, down arrow, and return keys in a specific way. Currently, there is no way to capture the up arrow and down arrow events without adding another event to the _inputElement's onKeyPress handler. Furthermore, I cannot even use this technique to handle return since the current event handler for return removes focus from the text field and, in javascript, there is no way to remove an event handler unless I already have a reference to it (which I don't since it is a file-scoped variable). There should be some way for a delegate to handle keyDown on a text field even if the actual text in the field doesn't change.
Comments
-
CPPopUpButton sends the action for a disabled menu item.
0 comments Created 5 months ago by sgriffinThe method to handle the menu window's selection associated with a CPPopUpButton send the menuItem's action to its target regardless of whether that menuItem is enabled or not.
Method where this is a problem is menuWindowDidFinishTracking:highlightedItem.
Comments
-
Menu Bar Items do not respond to mouse clicks properly
0 comments Created 5 months ago by amossonWhen a menu is open, a click on any other menu item closes the open item but does not open menu item that was clicked on.
Steps to reproduce -
- use capp gen to make a sample interface builder app
- load index.html
- click on New Application menu bar item
- click on File item
Expected Results
New Application closes AND File opensActual results
New Application closesComments
-
If I have view A with subview B, if subview B does not override mouseEntered or mouseExited, moving the mouse on to subview B (from a point that is already on view A) will call mouseEntered on view A since the default implementation of mouseEntered just goes down the responder chain. I don't know how Cocoa handles this case.
Comments
I am working on this - proposed fix at http://github.com/saikat/cappuccino/commit/8a2788f7ad4d9a2423a004f8b991bf42e3588efe
-
Currently CPTableView does not seem to respond to key events. The most desirable incorporation would be scrolling up and down a list with the moveUp and moveDown events. It would also be nice if actions could be registered for moveRight and moveLeft as currently those events do not seem to propagate past CPTableView.
Comments
-
Framwork/AppKit/Resources/Aristo.blend/Info.plist does not get inlined.
Comments
-
CPCollectionView's setMaxNumberOfRows is not working
1 comment Created 4 months ago by klaaspieter -
CPTextField setTextFieldBackgroundColor doesn't work
0 comments Created 4 months ago by lavfrancisWhen setTextFieldBackgroundColor is set on a textfield in version 7.0 an higher (up-to-date git repo), the background color get ignored.
Here's part of the code I use in init.
userField = [[CPTextField alloc] initWithFrame:CGRectMake(95, 45, 200, 22)]; [userField setEditable:YES]; [userField setSelectable:YES]; [userField setBordered:YES]; [userField setDrawsBackground:YES]; [userField setBackgroundColor:[CPColor whiteColor]]; [contentView addSubview:userField];Note that if we use setBackgroundColor, that's working fine.
Comments
-
CPSplitView should retain subview size when restoring from double-click collapse
0 comments Created 4 months ago by flipsasserWhen I resize a subview in a CPSplitView, then double-click its divider to collapse it, then double-click the divider to open it, it opens to whatever it calculates from my delegates' min and max- NOT its original position. I feel returning to its original position (pre-collapse) should be the default behavior.
Comments
-
CPControl nil targets do not traverse the responder chain
0 comments Created 4 months ago by klaaspieterApple's docs say:
If anObject is nil but the control still has a valid action message assigned, the application follows the responder chain looking for an object that can respond to the message.
Cappuccino currently just ignores actions that don't have a target.
Comments
-
nib2cib doesn't honor trackingMode for CPSegmentedControl
0 comments Created 4 months ago by topfunkyAlthough nib2cib mentions trackingMode several times in the source, it doesn't properly translate the value when making a cib. It appears to set it to null.
Steps to reproduce:
- Generate a new application with capp and the NibApplication template.
- Drag an NSSegmentedControl onto a window in Interface Builder. Leave the tracking mode to the default of "Select One".
- Convert it with nib2cib
- Open app in browser
- The CPSegmentedControl now seems to use "Any" and allows multiple segments to be selected at once.
Example:
http://peepcode.com/system/uploads/2009/bug/SegmentedAppBug/index-debug.html
Specs:
- Cappuccino 0.7 and also from current master 761e32a
- Safari 4.0.1
- Interface Builder 3.1.2
Comments
-
Theme Showcase does not honor Enabled/Disabled across themes
0 comments Created 4 months ago by chandlerkentI'm not sure if this is the correct forum for this issue report, but here it is.
When viewing the Theme Showcase on cappuccino.org (http://cappuccino.org/aristo/showcase/), if you change the "State" to "Disabled" when viewing the Aristo theme and then switch to the Aristo-HUD theme, the control is not Disabled as would be expected.
Comments
-
I fixed the bug reported here. It was an encoding issue.
http://groups.google.com/group/objectivej/browse_thread/thread/e4bc41026a8f100f/6b14f3b74189df18
Commit:
http://github.com/cacaodev/cappuccino/commit/259bb567af1026292fb7e1fb25a66db6387943e8Comments
-
Unecessary menu items in default NibApplication's MainMenu.xib/.cib
0 comments Created 4 months ago by hlshipFrancisco has stated on the mail list that, yes, there's lots of extra non-nonsensical options that could be removed to be more in line with a webapp, not a desktop app.
Comments
-
By default when a label is being edited it should contain a focus ring.
This issue may be larger than the CPTextField as I believe setFocusRing: is part of CPView, however I believe the implementation of the focus ring is specific for each control.
The focus ring for the textfield is included as part of the bezel and there is no way to get the focus ring without adding a bezel too.
______ ______
Commit for the fix:
http://github.com/Me1000/cappuccino/commit/83c512e13d22a5ec79567f61226017df3dcc2576Comments
chandlerkent
Mon Jul 27 17:11:39 -0700 2009
| link
In what situation would you want a focus ring without a bezel?
A label in Cocoa that has been set editable would display a focus ring around the exterior without a bezel by default. You can turn the focus ring off.
I think when editing the label it's enough to just add the focus ring and not the bezel.
also sometimes when a text field that actually looks like a text field (not a label) has focus it would be nice to turn off the focus ring. The Cocoa behavior would be setFocusRingType: NSFocusRingTypeNone which would then prevent any focus ring around the textfield. This is used extensively in the HUD where focus rings sometimes look out of place.
chandlerkent
Mon Jul 27 17:25:44 -0700 2009
| link
I agree.
I've went ahead and pulled the focus ring off of the default focused button in the aristo PSD file. I made some edits to CPTextField and the theme descriptors file to add separate the focus ring from the bezel.
You can see a demo of it here.
http://rclconcepts.com/temp/obj-j/Aristo/The "Standard text field" and "rounded text field" are the only text fields that are using the images with the bezel and the focus ring together. The other text fields are all adding a focus ring around the text field or if there is a bezel around that.
All the changes were commited to my fork.
http://github.com/Me1000/cappuccino/commit/83c512e13d22a5ec79567f61226017df3dcc2576Also, there is no reason this same focus ring couldn't be used for more controls that support the focused state.
There is a reason. It's an image. And controls have custom shapes. If we were drawing it it would be easier, but because we aren't, each control basically needs its own image.
Neither of these commits is valid any longer. Does the bug still exist? If so can we make them available again?
Right, I didn't think of that.
http://github.com/Me1000/cappuccino/commit/2e7e1c0e4b0347163d095801230f886f5192bfe4
that is the latest commit of the CPTextField.j you'll also need ThemeDescriptors.j since the focus-ring is themeable and the Aristo images.
-
When a CPTextField is being edited, the function handlers for the DOMInputElement do not forward the event to cappuccino's keyDown/keyUp methods and as such extending the behavior of CPTextField is very difficult.
Secondly, the default behavior on Enter and Tab keys when editing are hard coded and cannot be overridden
All of the handlers are declared class level and thus are not visible to child classes, so behavior of the DOMElement cannot be modified directly (though this is probably the least nice option for extending).
Workarounds to this are overriding the [CPTextField _inputElement] in which case there is a large amount of code duplication in order to allow the textField to retain default behavior and no way to remove the event handlers as they are not visible to subclasses. For the Tab and Enter keys, resignFirstResponder can be modified to return false in a state where the Tab and Enter keys need to be handled differently. This makes for painful subclassing.
Comments
-
objj_standardize_path tries to standardize paths with standalone ../
1 comment Created 3 months ago by ShadowfiendIf you add ../ to the include path, you get TypeError: Cannot read property "length" from undefined'.
This is likely to be caused by line 487 in file.js (http://github.com/280north/cappu... ) which seems to my admittedly unfamiliar eye to be wrong.
As far as I can tell, this:
if (aPath.indexOf("/./") != -1 && aPath.indexOf("//") != -1 && aPath.indexOf("/../") != -1)
Should actually be:
if (aPath.indexOf("/./") == -1 && aPath.indexOf("//") == -1 && aPath.indexOf("/../") == -1)
i.e., if none of those patterns exist in the path, then don't bother processing it. If any of them do, then go ahead and eliminate them. Vs currently where I understand it to mean if all three are present, then don't try to standardize the file, which seems... Odd.
Comments
Shadowfiend
Thu Sep 17 14:08:37 -0700 2009
| link
As an addendum, objj_standardize_path also fails on leading ../es and ../es that lead to a directory above the first listed one (e.g., 'mydir/../../'). See my repo, commit 02251a8 for a fix.
-
objj currently uses a simple Java BufferedReader for reading input
from the command line. Using JLine offers some compelling features
(e.g., tab completion) with a little bit of work, and a few very useful ones with practically no work at all. In particular, I've just
changed line 33 of objj.js to read:var br = new Packages.jline.ConsoleReader();Since JLine comes packaged with narwhal, no additional work need be
done. This adds some basic console interaction features like being
able to hit up and down to navigate in the console history.
Any chance this could be integrated into the objj executable out of
the box? (I can fork the repo and send a pull request, just want to
see if there is some interest in it.)Comments
Shadowfiend
Thu Sep 17 14:17:06 -0700 2009
| link
Handled differently in commit 2423faa.
-
objj -I argument only works for running files, not interactive mode
0 comments Created 3 months ago by Shadowfiendobjj current ignores -I parameters instead of adding them to the list of include paths when you enter interactive mode. It should add any paths specified by -I to the include paths and then enter interactive mode with those paths in the list.
Comments
-
mouseExited gets sent to subviews that have been removed
0 comments Created 3 months ago by saikatTo recreate this issue:
1. Add view A as a subview to view B
2. Put mouse over view A
3. Remove view A from its superview
4. When you move your mouse now, view A still gets a mouseExited eventComments
-
CPmenu should reflect immediately a CPMenuItem change (title, state,…)
0 comments Created 3 months ago by cacaodevWhen a CPMenuItem changes it’s title and the menu is open, you don’t see changes unless you close and reopen the menu.
I assume the visual update should occur in CPMenu -itemChanged:
I also noted that regular menu (not menu bar menus) delegate don’t register for notifications when they implement the delegate method.Comments
-
There is a call to [self proposedFileURL] in saveDocumentAs: in CPDocument.j . There does not seem to be a method on CPDocument of proposedFileURL, so saving throws an exception.
Comments
-
When you click on a CPButton, the firstResponder is set to window
0 comments Created 3 months ago by cacaodevWhat should happen: by default nothing, when you click on a button the first responder should not change.
Comments
-
CPTableView doesn't highlight selected data views
6 comments Created 2 months ago by klaaspieterCPTableView should set it's dataviews highlighted when the dataview's row is selected.
The tableview should not just draw it's selection, it should also send highlight: (or setHighlighted:) to the dataCell for that row. This way a programmer will be notified of any highlighted state changes in it's custom data cells and can update the drawing of that cell accordingly
Comments
klaaspieter
Fri Sep 18 00:38:26 -0700 2009
| link
The bug that I'm describing is different then the bug you where experiencing.
The tableview should not just draw it's selection, it should also send highlight: (or setHighlighted:) to the dataCell for that row. This way a programmer will be notified of any highlighted state changes in it's custom data cells and can update the drawing of that cell accordingly
I've just implemented [dataView setHighlight:] in my repo.
Please have a look, and tell me if you agree about themed properties not archived and if there's a way to fix that (I didn't explore the problem very much).http://github.com/cacaodev/cappuccino/commits/tableview-extra
klaaspieter
Mon Oct 19 00:12:07 -0700 2009
| link
The setHighlight code looks ok. Can't really test it now, but will try to merge your changes into my repo later.
Wouldn't adding the themed properties to Aristo solve the problem?
I tried again to set theme attributes on the dataView before doing [CPtableColum setDataView:] and now it works. Now I also set the highlight in CPTableView with [view setState:CPTheStateHighlighted] instead of setHighlighted:, maybe that's the reason it works.
Can you build a packed little commit I can take a look at to try and get this merged in?
Here it is:
http://github.com/cacaodev/cappuccino/commit/20d39dd20cf623884aa9b109bece14f6c5bcd0c1(btw, it would be cool to have a step-by-step in the wiki explaining how to build a commit against upstream master from several other commits or even parts of them).
-
CPTableView no longer recognizes double click on a row
0 comments Created 2 months ago by BlairDuncanIt used to work up until the latest master.
Comments
-
CPCollectionView issues with _cachedItems
1 comment Created 2 months ago by jfahrenkrugI have a master cpcollectionview and a detail cpcollectionview. When I click on a masteritem, the content in the detail-collectionview changes. This works fine. I call setContent on it and everything works as expected.
BUT when I select - say - item 2 and then change call setContent with a different list of items and call setSelectionIndexes:[CPIndexSet indexSetWithIndex:0], both the first and the second item appear to be highlighted, although I called setAllowsMultipleSelection:NO.
Explicitly sending setSelection:NO to each item before I call setContent works around this issue, but I somehow suspect the _cachedItems in cpcollectionview to have something to do with this.- Johannes
Comments
-
Objective-J class documentation does not display inheritance
0 comments Created 2 months ago by hlshipDocumentation of a class should include a link to its super-class. Currently, you have to hope that the class documentation includes such a reference.
In addition, the "list all members" page does NOT include inherited members. Example:
http://cappuccino.org/learn/documentation/class_c_p_view-members.html
Comments
-
CPFont should be able to use multiple font families which fall back on each other, since we are on the web and not all fonts are cross platform.
I've written more about this on the development list, including a rough patch: http://groups.google.com/group/objectivej-dev/browse_thread/thread/42ce12acbaa3e0c6
Comments
-
I have followed the instructions for installing Cappuccino with git clone.
When I type "rake install" I get this error:org.mozilla.javascript.WrappedException: Wrapped java.io.FileNotFoundException: /Volumes/Data HD/Users/USER/Downloads/cappuccino/cappuccino/“/Volumes/Projects”/Debug/env/narwhal.js (No such file or directory)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1776) at org.mozilla.javascript.MemberBox.newInstance(MemberBox.java:202) at org.mozilla.javascript.NativeJavaClass.constructSpecific(NativeJavaClass.java:282) at org.mozilla.javascript.NativeJavaClass.construct(NativeJavaClass.java:200) at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2328) at org.mozilla.javascript.gen._Volumes_Data_HD_Users_USER_Downloads_cappuccino_cappuccino___Volumes_Projects__Debug_env_engines_rhino_bootstrap_js_1._c_anonymous_1(Unknown Source) at org.mozilla.javascript.gen._Volumes_Data_HD_Users_USER_Downloads_cappuccino_cappuccino___Volumes_Projects__Debug_env_engines_rhino_bootstrap_js_1.call(Unknown Source) at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76) at org.mozilla.javascript.gen._Volumes_Data_HD_Users_USER_Downloads_cappuccino_cappuccino___Volumes_Projects__Debug_env_engines_rhino_bootstrap_js_1._c_script_0(Unknown Source) at org.mozilla.javascript.gen._Volumes_Data_HD_Users_USER_Downloads_cappuccino_cappuccino___Volumes_Projects__Debug_env_engines_rhino_bootstrap_js_1.call(Unknown Source) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:405) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3066) at org.mozilla.javascript.gen._Volumes_Data_HD_Users_USER_Downloads_cappuccino_cappuccino___Volumes_Projects__Debug_env_engines_rhino_bootstrap_js_1.call(Unknown Source) at org.mozilla.javascript.gen._Volumes_Data_HD_Users_USER_Downloads_cappuccino_cappuccino___Volumes_Projects__Debug_env_engines_rhino_bootstrap_js_1.exec(Unknown Source) at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:563) at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:485) at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:451) at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:443) at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:196) at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:117) at org.mozilla.javascript.Context.call(Context.java:517) at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:514) at org.mozilla.javascript.tools.shell.Main.exec(Main.java:179) at org.mozilla.javascript.tools.shell.Main.main(Main.java:157)Caused by: java.io.FileNotFoundException: /Volumes/Data HD/Users/USER/Downloads/cappuccino/cappuccino/“/Volumes/Projects”/Debug/env/narwhal.js (No such file or directory)
at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at java.io.FileInputStream.<init>(FileInputStream.java:66) at java.io.FileReader.<init>(FileReader.java:41) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.mozilla.javascript.MemberBox.newInstance(MemberBox.java:194) ... 22 moreSystem:
OS X 10.5 with rake version 0.8.7; git version 1.6.4.2; and 686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493).Can anyone help?
Comments
-
CPScrollView does not load it's header clip view when it's decoded
0 comments Created 2 months ago by klaaspieterThe CPScrollView initWithCoder initializer does not create a header clip view.
Commit with possible fix can be found here: http://github.com/klaaspieter/cappuccino/commit/412c30adbed1644646e1b54d2c6e37786afa4150
Comments
-
When using press to 'press' a project, unicode characters get messed up.
For example the secure text field character definition is translated from:
var CPSecureTextFieldCharacter = "\u2022";to:
var _f="•";Comments
-
Module documentation doesn't document constants
1 comment Created 2 months ago by hlshipThere are many, many important constants defined inside Foundation and AppKit that are needed every day by Cappuccino developers but these are not documented at all inside the documentation. The documentation generation tool needs to be extended to document these constants (they may also need to be flagged with some kind of meta-data to describe where they used, for example, to identify that CPViewWidthSizable, CPViewHeightSizable, CPViewMinXMargin, etc. are all used together.
Comments
-
Windows with CPBorderlessWindowMask has no toolbar layout support
1 comment Created 2 months ago by luddepAdding a toolbar to a window that has a CPBorderlessWindowMask puts the toolbar beneath the contentview of that window.
A quick has is to use:
contentView._DOMElement.style.setProperty("z-index", "-1", null);to place the contentview beneath the toolbar.
A real fix is possible by copying the - (CGRect)contentRectForFrameRect:(CGRect)aFrameRect; and - (CGRect)frameRectForContentRect:(CGRect)aContentRect; from CPStandardWindowView.j to add the layout support, and a copying the - (void)tile; method from CPBorderlessBridgeWindowView.j to add in the background image.
Comments
Here's a quick gist with the methods copied over to _CPBorderlessWindowView.j: http://gist.github.com/186289
-
CGContextDrawImage with rectangles for destination and source image/context
2 comments Created 2 months ago by robdeHere is my suggestion:
CGContextCanvas.j: http://gist.github.com/186437
CGContextVML.j: http://gist.github.com/186431
Comments
Gives you the possibility to slice images. And since it's part of the W3C standards in the CanvasHTMLElement (void drawImage(in HTMLImageElement image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh), http://dev.w3.org/html5/spec/Overview.html#images) why not use it?
-
It would be nice if there were an option to disable the little black arrows that indicates a drop down menu in the menu bar.
Comments
-
CPTextField loses firstResponder when a non-hittesting view is on top of it
0 comments Created 2 months ago by saikatIf you add a CPTextField and then a view on top of it, clicking on the CPTextField will fire the text field's onBlur function causing the text field to lose first responder, even if the view on top of it does not hitTest or accept first responder.
Comments
-
When the CPSearchField is used on a window, the 'recent searches' menu appears in the wrong location. It looks like it is displayed relative to the main window, not the window the CPSearchField is on.
Comments
jmacmullin
Tue Sep 15 22:20:02 -0700 2009
| link
I've submitted a patch that fixes this issue here:
http://github.com/jmacmullin/cappuccino/commit/12945b7f598cccaf66289c09a6b9dcd321146c0d -
CPScrollView does not implement a setBorderType/borderType
0 comments Created 2 months ago by ghulandsIt would be good if it can implement just a frame border to start with so table view and outline views can easily get a frame around them.
Comments
-
May I know will it be possible to have localization support for cappuccino?
Comments
-
It would be nice if there were a possibility to add highlight images to the menu bar that appear when a menu bar item is clicked (Example: the Mac OS X volume control menu bar item at the top).
Comments
Hey robde, do you mean to have highlighting for the selected menu items? (as in OS X the menu item becomes say blue and the icon/text white).
No, I mean the menu bar images in Cappuccino, the menu bar item icons.
-
In Firefox , [CPEvent timestamp] returns an incorrect time interval
1 comment Created about 1 month ago by cacaodevWhen you capture an event, like with -mouseDown:(CPEvent)event, the -timestamp method of this event returns an incorrect CPTimeInterval. This is because in FireFox, unlike webkit, the js property domEvent.timeStamp returns a duration in ms since a reference date != 01-01-1970. For example,on my system with FireFox 3.5, the ref date is August 9 2009. So I assume the ref date changes at each release.
Maybe it's a bug in Firefox, I didn't check the HTML spec.Solution: We need to recalculate the timestamp since 1970 for all affected FF versions.
Also , -timestamp returns a time in ms instead of s in FireFox AND Webkit.Here is an example showing this bug:
http://pagesperso-orange.fr/cocoadev/TimeStampBug.zipComments
thanks for the bug test app, I have commited it here if thats ok http://github.com/stevegeek/CappuccinoBugs. Strange behaviour from FF...
-
DOM Node Error 8, when using NSTabView in IB via Nib2Cib
0 comments Created about 1 month ago by terhechteThere's an error that appears as soon as one adds a NSTabView onto a window and converts it to cib. The xib / nib converts without errors / problems, but the cib file won't load, due to the fact that Cappuccino somehow tries to remove a non-existent subview upon loading. I tracked the error down to the following code in AppKit/CPTabView.j (function selectTabViewItem:) (Line 392):
[contentView removeFromSuperview]; [auxiliaryView removeFromSuperview];This code fails, if there's no subview to remove. Since I needed this to work for a project, I changed it as follows:
if(contentView)[contentView removeFromSuperview];
if(auxiliaryView)[auxiliaryView removeFromSuperview];and did a fresh rake release & rake install
Now it works, though it might very well be, that this hack leads to new problems. However, if someone stumbles upon this problem, and like me needs a solution, this is at least a temporary one.
Cheers, Benedikt
Comments
-
Toolbar required delegate "toolbarAllowedItemIdentifiers" does not get called
2 comments Created about 1 month ago by BlairDuncanOf the 3 required delegates, only 2 get called.
-(CPArray)toolbarAllowedItemIdentifiers:(CPToolbar)toolbar never gets called.
Comments
Hey BlairDuncan, can you please submit a code snippet or AppController.j that highlights this bug? thanks!
Here is a snippet for a toolbar delegate - notice that the alert message in toolbarAllowedItemIdentifiers will not pop up.
@import <Foundation/CPObject.j> var AddToolbarItemIdentifier = "AddToolbarItemIdentifier", EditToolbarItemIdentifier = "EditToolbarItemIdentifier", RemoveToolbarItemIdentifier = "RemoveToolbarItemIdentifier"; @implementation ToolbarDelegate : CPObject { } - (CPArray)toolbarAllowedItemIdentifiers:(CPToolbar)aToolbar { alert("I NEVER GET CALLED"); return [AddToolbarItemIdentifier, EditToolbarItemIdentifier, RemoveToolbarItemIdentifier]; } - (CPArray)toolbarDefaultItemIdentifiers:(CPToolbar)aToolbar { alert("toolbarDefaultItemIdentifiers called OK"); return [AddToolbarItemIdentifier, EditToolbarItemIdentifier, RemoveToolbarItemIdentifier]; } - (CPToolbarItem)toolbar:(CPToolbar)aToolbar itemForItemIdentifier:(CPString)anItemIdentifier willBeInsertedIntoToolbar:(BOOL)aFlag { var toolbarItem = [[CPToolbarItem alloc] initWithItemIdentifier:anItemIdentifier]; var mainBundle = [CPBundle mainBundle]; var imageFilePath; var altImageFilePath; var labelText; switch(anItemIdentifier) { case AddToolbarItemIdentifier: labelText = @"Add new blog post"; imageFilePath = [mainBundle pathForResource:@"add.png"]; altImageFilePath = [mainBundle pathForResource:@"addHighlighted.png"]; break; case EditToolbarItemIdentifier: labelText = @"Edit blog post"; imageFilePath = [mainBundle pathForResource:@"edit.png"]; altImageFilePath = [mainBundle pathForResource:@"editHighlighted.png"]; break; case RemoveToolbarItemIdentifier: labelText = @"Delete blog post"; imageFilePath = [mainBundle pathForResource:@"remove.png"]; altImageFilePath = [mainBundle pathForResource:@"removeHighlighted.png"]; break; default: return nil; } var size = CPSizeMake(30, 25); [toolbarItem setLabel:labelText]; [toolbarItem setImage:[[CPImage alloc] initWithContentsOfFile:imageFilePath size:size]]; [toolbarItem setAlternateImage:[[CPImage alloc] initWithContentsOfFile:altImageFilePath size:size]]; [toolbarItem setMinSize:size]; [toolbarItem setMaxSize:size]; return toolbarItem; } @end -
Hi,
running todays code, (October 1st 2009), when I drop a tableview into a window in Interface Builder and then nib2cib it, I get-[CPKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (NSTableHeaderView)
Cheers
Nik
Comments
-
CPScrollView clips alternating color incorrectly from CPTableView when scrolling up
2 comments Created about 1 month ago by hammerdrCode:
http://gist.github.com/201610When scrolling, the alternate background color seems to disappear. Does not seem to do this for the primary color nor for a highlighted row.
Comments
The code has been added to a test app here: http://github.com/stevegeek/CappuccinoBugs .
The bug can easily be observed.
eliasklughammer
Mon Nov 02 23:27:21 -0800 2009
| link
Had the problem too. Made some screenshots:

-
"null" in CPWindowWillCloseNotification when compiled
2 comments Created about 1 month ago by eboehnischI am listening for the CPWindowWillCloseNotification notification and compare the object value with my CPPanel to detect whether it is my window that closed or not. When using the uncompiled code in my project it works as expected. When compiling it through rake, this no longer works but delivers "null" as the object value.
In addition, programmatically closing the panel using [myPanel close] has no effect. Manually closing closes the panel but, as said, does not send the correct notification. In the uncompiled code, it works as expected.
To recreate, open a CPPanel, then listen for CPWindowWillCloseNotification when you close the panel.
Comments
Hey eboehnisch, thanks for the report, I build a test app for the bug that has been pushed to http://github.com/stevegeek/CappuccinoBugs, however I do not see the problem. When i rake release or debug the project the notification is still sent fine. Please can you submit a test that highlights the problem so i can update my test app.
steve
eboehnisch
Mon Oct 12 01:49:33 -0700 2009
| link
Hi Steve. Sorry that I was so slow in commenting my own bug report. I have found the bug later that day and it was not in the CPWindowWillCloseNotification notification but actually in an instance variable that somehow gets lost in the compiled version. I first initialize a window using:
var theWindow = [[CPPanel alloc] initWithContentRect:CGRectMake(CGRectGetMidX-(NEWNOTEWIDTH/2), CGRectGetMidY-(NEWNOTEWIDTH/2), NEWNOTEWIDTH, NEWNOTEHEIGHT) styleMask:CPHUDBackgroundWindowMask | CPClosableWindowMask];I later compare theWindow with the object returned from CPWindowWillCloseNotification. At that time, however, theWindow is null. I now make a copy ("theWindowRef = theWindow;") and compare with it and this works. This is not necessary in the uncompiled version where everything works as I expected.
-
Change item prototype with CPCollectionView
0 comments Created about 1 month ago by FozzIf a developer wants to use the same collection view to display different sets of data in different ways (using different prototypes) it would make sense for them to
a) change the prototype view with [collectionView setView:newView];
b) set the new content with [collectionView setContent:newContent];When attempting this the new data does not display correctly and old data is still visible. It seems like a caching issue. I'm guessing that to fix this the collection view just needs to be flushed of data and views.
If that is not a possible fix then allowing a workaround of setting the content to an empty array (i.e. flushing out the old data) would be great. At present it does not work.
Test code (May have some bugs as it was pasted together like a frankenstein monster. Remember to import ItemViewA and B):inside AppController.j---------------------------
var itemList=[[CPCollectionView alloc] initWithFrame:CGRectMake(0 0, 500,500)];
[itemList setMinItemSize:CGSizeMake(200.0, 50.0)]; [itemList setMaxItemSize:CGSizeMake(2000.0, 200.0)]; [itemList setMaxNumberOfColumns:1]; [itemList setBackgroundColor:lightGray]; [contentView addSubview:itemList];var item=[[CPCollectionViewItem alloc] init];
var dataA= [[CPArray alloc] init];
[dataA addObject:"Item 1"]; [dataA addObject:"Item 2"];
var prototypeA=[[ItemViewA alloc] initWithFrame:CGRectMakeZero()];
[item setView:prototypeA]; [itemList setContent:dataA];
//this would be a nice workaround...if it worked //[itemList setContent:[[CPArray alloc] init]];
var dataB= [[CPArray alloc] init];
[dataB addObject:"Other Thing 1"]; [dataB addObject:"Other Thing 2"]; [dataB addObject:"Other Thing 3"];
var prototypeB=[[ItemViewB alloc] initWithFrame:CGRectMakeZero()];
[item setView:prototypeB]; [itemList setContent:dataB];
ItemViewA.j------------------------------------
@implementation ItemViewA: CPView {
CPTextField title;} - (void)setRepresentedObject:(id)obj{
var title = [[CPTextField alloc] initWithFrame:CGRectMakeZero()]; [title setStringValue:obj]; [title sizeToFit]; [title setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin]; [title setCenter:[self center]]; [self addSubview:title];} @end
ItemViewB.j------------------------------------------
@implementation ItemViewB: CPView {
CPTextField title;} - (void)setRepresentedObject:(id)obj{
var title = [[CPTextField alloc] initWithFrame:CGRectMakeZero()]; [title setStringValue:obj]; [title sizeToFit]; [title setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin]; [title setCenter:[self center]]; [self addSubview:title];} @end
Comments
-
CPWindow -setFrame:display:animate: should not honor minSize and maxSize
1 comment Created about 1 month ago by cacaodevFrom cocoa docs:
"The minimum size to which the window’s frame (including its title bar) can be sized either by the user or by the setFrame... methods other than setFrame:display: and setFrame:display:animate:."This could be easy to fixed by removing 2 lines in the method except that in the current implementation, other setFrame... methods (that have to limit the size to min/maxSize) are calling -setFrame:display:animate:.
So what should we do ?
- remove this dependency and rewrite setFrame... methods - Or create a private method _setFrame:display:animate:limitSize:limit that would be called by setFrame... methods with limit = YES and setFrame:display:animate with limit = NO.I' m waiting for instructions before going further.
Nota bene: fixing this will allow to have resizable attached sheets with min/max sizes.
Comments
Proposed fix for this:
http://github.com/cacaodev/cappuccino/commit/72f6da6bcb1990b584dd0754adddb094c545e802Résumé:
-setFrame:display:animate: now ignores min/maxSize.-setFrame: & setFrameSize: now compute the new frame/size with min/maxSize before calling the above method.
I didn't change setFrameOrigin: because even if the cocoa doc say it should, it seems weird to me to change the size when you want to change the origin.
Updated the AttachedSheet example to show a window animation starting from a size < minSize , something that was impossible before this fix.
-
There's still a problem with the CGDrawLinearGradient-function. But this code works to make a gradient:
- (void)drawRect:(CGRect)rect
{
var startPoint = CGPointMake(0, 0); var endPoint = CGPointMake(0, rect.size.height); var startColor = [CPColor redColor]; var endColor = [CPColor blackColor]; var currentContext = [[CPGraphicsContext currentContext] graphicsPort]; var fStyle = currentContext.createLinearGradient(startPoint.x, startPoint.y, endPoint.x, endPoint.y); fStyle.addColorStop(0.0, "rgba("+ROUND(255[startColor components][0])+", "+ROUND(255[startColor components][1])+", "+ROUND(255[startColor components][2])+", "+[startColor components][3]+")"); fStyle.addColorStop(1.0, "rgba("+ROUND(255[endColor components][0])+", "+ROUND(255[endColor components][1])+", "+ROUND(255[endColor components][2])+", "+[endColor components][3]+")"); currentContext.fillStyle = fStyle; currentContext.fillRect(0, 0, rect.size.width, rect.size.height); }
Comments
I finally found a fix for this.
in CGDrawLinearGradient, just replace the line
context.fill();
with
var canvas = context.canvas; context.fillRect(0,0,canvas.width,canvas.height);The reason it broke recently is that the webkit team decided that we shouldn't be able to draw a gradient when no path in set. In Cocoa, you can draw gradients without specifiying a rect: the drawing area becomes the clipping region which is by default the bounds of the view where you are drawing. So I think it should be the same in cappuccino.
In CGDrawLinearGradient , i also noted that linearGradient is created each time the function is called. Can't we find a way to cache it and recreate in only when the start/end points change ?
Or better said:
if (CGContextIsPathEmpty(context)) { var canvas = context.canvas; context.fillRect(0,0,canvas.width,canvas.height); } else context.fill();So we can draw on a path when there is one / fill the view when no path.
First need to implement CGContextIsPathEmpty() in CGContextCanvas. This can be achieved , i think, by setting a flag to NO in CGContextBeginPath() and YES in all other methods that add subpaths to the current path. - (void)drawRect:(CGRect)rect
{
-
capp command line tool does not correctly parse options
0 comments Created about 1 month ago by naehrstoffWhen calling
capp gen -lt NibApplication TestAppthe -l and -t options are not parsed. A solution is to not combine them (capp gen -l -t ...), but this is standard for *nix programs, so I think it's a bug.Comments
-
CPTextField should support text wrap (multi-line text)
2 comments Created about 1 month ago by masonmarkCPTextField should be updated to support text wrap. This is especially useful for UIs which incorporate things like a catalog product description, instructional text, status messages, etc., and also for user input of text that may not fit on one line.
In Cocoa's NSTextField, this is handled by the text field's underlying cell[1] (via -[NSCell setWraps:]), but since Cappuccino doesn't use cells for text fields, I think it should just be -[CPTextField setWraps:].
There is a forum thread about this2, and it links to some partial implementations of this feature.
keywords for automatons: soft wrap, multiline, textarea,
Comments
-
Can't compile themes that have framework files imported.
1 comment Created about 1 month ago by luddepRunning rake to compile a custom theme hangs if you try to import custom frameworks located in your Frameworks folder of the themeDescriptor project.
Moving the files around and importing them using "MyKit/MyView.j" rather than <MyKit/MyView.j> fixes the problem.
Comments
It seems that you have to symlink / put any frameworks in your objj narwhal package for it them to be import:able.
Not sure what a good solution would be, but there probably is a better one than having to have your frameworks symlinked all over the place for everything to work.
-
A native cursor support for elements like buttons, collectionViews etc. would be very important.
Of course, in native desktop apps there isn't the "pointer" cursor for example.
In the past I had some conversations with customers who didn't understand why there's no pointer-Cursor on a menu-item. And I understand the point.
This cursor got important when the web got bigger. It indicated that if you click on an element something would happen.Because of cappuccino apps live in the browser it would be very important to supprt the feature to manually choose the cursor.
By the way at the moment you have to solve this problem by touching the DOM:
self._DOMElement.style.cursor = "pointer";
Comments
Here is a basic CPCursor implementation.
Warning: you can't set a CPCursor and update on mouse moved events for a specific view but only for the whole application. This would come with a CPTrackingArea implementation i guess.
Tested in WebKit/FF/IE/Opera: see comments for what's working and what's not.
Feedback welcome !http://github.com/cacaodev/cappuccino/commit/123f3bfe5672c64daeb0bde05a5c9aeaaeacfb60
-
Hi!
My port of NSOperation might be a good addition to the core: http://github.com/jfahrenkrug/CPOperation
Maybe, maybe not.- Johannes
Comments
-
Comments
-
This is a regression.
Comments
Partial solution here - http://github.com/saikat/cappuccino/commit/e121c39da1f0ac4832d8c6ddb362f733e74e6c01
-
Implement CPLineBreakByTruncatingMiddle
4 comments Created about 1 month ago by jmacmullinCurrently calling [textField setLineBreakMode:CPLineBreakByTruncatingMiddle] causes the textField to appear with a truncated tail as CPLineBreakByTruncatingMiddle has not been implemented.
It would be nice if it was implemented.
Comments
jmacmullin
Mon Oct 19 22:25:31 -0700 2009
| link
I've implemented a version of this that works-around the fact that CSS doesn't seem to have a text-overflow-mode:ellipsis-middle.
My work-around is to replace the _CPImageAndTextView's text with 'displayText' that has had enough characters removed from the middle to fit in the view (leaving space for the ellipsis). It feels a little like a hack - but it works and this is a feature I need.
My implementation is here:
http://github.com/jmacmullin/cappuccino/commit/0fdc2a3883d718b3b28f188b1d7716fc11c8a00c
jmacmullin
Wed Oct 28 23:45:19 -0700 2009
| link
I only saw it yesterday for some reason. Thanks for reviewing my code :-) You make some good points. I'm 1/2 way through addressing them and should have a revised version ready before the weekend (I hope).
jmacmullin
Thu Oct 29 18:51:25 -0700 2009
| link
Ok, I've committed some changes to address the points you raised. Here's the commits:
http://github.com/jmacmullin/cappuccino/commit/c8f40fc0ec4b436bcd140dbd508ba2fd79048ed7http://github.com/jmacmullin/cappuccino/commit/e5fbb3cfb8d36ea4938e7978942c6197b17fb180
In response to your comments:
- It doesn't clear out _displayText anywhere
I've added code to clear out displayText when the CPImageAndTextViewLineBreakModeChangedFlag is set.
- Also, the order in which things are calculated is broken
I've moved the code that handles the line break mode so that it is executed after the textRect metrics are calculated.
- This does not seem to take into account the actual computed size of text elements
It now only truncates text if it is wider than the textRect
- All of the If/else blocks are unnecessary
I've moved these in to a 'displayText' method
- you should review the style guidelines
I've gone through the code and declared variables together and only when they're needed. I've also tried to make sure my whitespace and braces all conform to the style guide.
- I'd also implement HEAD while I'm at it
done :-)
-
CPPopUpButton changes selection when removing item
0 comments Created about 1 month ago by klaaspieterIf an item is removed from the CPPopUpButton the selection shifts one position.
Steps to reproduce:
- Create a regular CPPopUpButton with several items
- Remove one (or more) items from the popup button
- The selection will have shifted by the amounts of items removed
Comments
- Create a regular CPPopUpButton with several items
-
When you begin a sheet it disables all active windows.
The sheet should only disable the window it is attached to.Comments
They are document modal, not application modal (cocoa doc about -beginSheet: is incorrect). If there is no document, it should only block events going to the parent window.
The solution could be to have a CPRunDocModalLoop, similar to the CPRunModalLoop in CPApplication, except the window would receive events if it has no attached sheet.@Me1000: I'm also working on sheets in a branch. HUDDocModalWindowView & min/maxSize support: http://github.com/cacaodev/cappuccino/tree/sheet
I've added shadows to the sheets in my branch if you want to integrate that into your stuff… There may be a better way to do it, but it was pretty simple. :)
-
Cannot update CPTabViewItem label when it is added to a CPTabView
0 comments Created 28 days ago by jtietemaCPTabViewItem :: setLabel updates the property but the changes never propagete to the _labelsView of CPTabView.
The only way to refresh the label is to remove the tabViewItem and readd it. (The label property is only read once when adding).
I have a branch with a possible fix: http://github.com/jtietema/cappuccino/tree/tabsupport
It introduces new API so it probably needs tweaking or it may not be the Cocoa way of doing it.Feedback would be much appreciated.
Comments
-
CPTabViewItem tabView tries to return a property that doesn't exist
0 comments Created 28 days ago by jtietemathe tabView method of CPTabViewItem tries to return _tabView property that doesn't exist.
Also there doesn't seem to be any API to assign the _tabView property if it would exist.
Comments
-
In the Mac OS X analogy, the MenuBar acts as the OS X Menu Bar (seen http://support.apple.com/kb/HT3737). In OS X, windows are not allowed to be laid over the Menu Bar. That is, if you drag a window and "slam" it against the top of the screen, the top boundary of the window will stop at the bottom boundary of the Menu Bar.
Similarly, Cappuccino CPWindows should do the same for the CPMenuBar. This currently does not happen as can be seen at 280slides.com/Editor
Comments
-
CGContextDrawLinearGradient() draws nothing in IE7
0 comments Created 27 days ago by cacaodevHere is a simple app showing the problem:
http://github.com/cacaodev/cappuccino/commit/4b1c27dde22284c870377d06142ce5b06b888059Either there is a path in the context current path(*) or not, nothing appears on the view.
IE console outputs an error "Object does not support that property". The log included in this function is: "<cg_vml_:fill type="gradient" colors="0% rgb(0, 0, 0),100% rgb(255, 255, 255)" />"(*) this is currently required for canvas browsers.
Comments
-
If you set the action of a CPPopUpButton only items added to the popup button programmatically will send the action when selected. Items added to the PopUpButton via a cib do not send the action when clicked.
Comments
-
The CPTextField selectText: method doesn't work anymore. I think it broke due to commit 6e7e3ef.
Comments
Seems to work for me. Can you be more specific? Provide a test case?
klaaspieter
Thu Oct 29 04:49:55 -0700 2009
| link
Just create a new capp application and change the default hello world label into a textfield. Inside the applicationDidFinishLaunching selectText: doesn't work.
If it's done inside controlTextDidFocus: it does work.
-
Command-C invokes copy twice in the default menubar
0 comments Created 23 days ago by saikat -
I'm trying to right-align a CPTableColumn's numeric data. It appears
-[CPTextField setAlignment:]doesn't do the job:[[pricesColumn dataView] setAlignment:CPRightTextAlignment];Digging a little deeper, setting the theme attribute directly also doesn't work:
[[pricesColumn dataView] setValue:CPRightTextAlignment forThemeAttribute:'alignment'];However, subclassing CPTextField and setting a custom data view does the trick:
@implementation RightAlignedTextField : CPTextField - (id)initWithFrame:(CGRect)aFrame { self = [super initWithFrame:aFrame]; if (self) { [self setValue:CPRightTextAlignment forThemeAttribute:'alignment']; } return self; } @end … [pricesColumn setDataView:[[RightAlignedTextField alloc] initWithFrame:CGRectMakeZero()]];Comments
So this is "correct" behavior for the following reason:
setDataView: creates a snapshot of the current view, which is then copied over and over for each individual cell that is shown, think of it kind of like a cross between the UITableView way of creating cells and NSCell.
so what is happening is the following:
[tableColumn setDataView:someView]; // snapshot taken [[tableColumn dataView] setSomething:x]; // this affects the view, but not the snapshot created through keyed archiving.now, this on the other hand would work:
[someView setSomething:x]; [tableColumn setDataView:someView];There are a few ways to avoid this confusion that Ross and I talked about:
- rename the API to something like [tableColumn snapshotDataView:] or something.
- On [tableView reloadData], simply recreate the snapshots from the actual references. In the same way that tableviews dont magically update their data (in non binding land) without calling reloadData, similarly the cells wouldnt all magically update. This would also avoid most the confusion, since all this setup is usually done before the reloadData that actually puts stuff on the screen.
thoughts?
Thanks for the comprehensive reply. I'd more lean toward documenting this behavior than anything -- it was easy to update my code once I understood the snapshotting.
Re-snapshotting in -reloadData is tempting, since -reloadData is supposed to be expensive, but the sad fact is many apps just call -reloadData instead of invalidating individual rows so probably just want as much work out of -reloadData as possible.
- rename the API to something like [tableColumn snapshotDataView:] or something.
-
Yeah it would be nice, wouldn't it?
Like [button onAction:function(sender){doStuff();}];
and [tabView selectionChanged:function(view, item){doStuff();}];-Fisk
Comments
Solution: http://github.com/fisk/cappuccino/commit/67461ce73cba15d026d7895ad3a84d10bf10053e
Makes it possible to use onAction: for CPController to set a block to be executed, and also makes it possible for classes to link their delegate methods to new methods that take blocks instead. -
In Firefox, hitting return on a CPTextField makes that return event fire twice
2 comments Created 20 days ago by saikatI believe this a regression. But, for example, if I set an action as the target of a text field, pressing enter on that text field will fire that action twice. Or, in another case, in the action of a text field I was setting another view as a first responder. Hitting enter in the text field was causing the action to fire, but then was also sending a keyDown with CPReturnKeyCode to the view that I was setting as first responder. This does not happen in Safari 4, but happens in Firefox 3 and Firefox 3.5.
Comments
-
This is a regression. This happens in both firefox and safari and on both release and debug frameworks. To test, create a secure text field and setStringValue to "test". Open the file and you will see only three bullets instead of four in the secure text field. Test gist - http://gist.github.com/223321
Comments
-
CPSearchField: MouseOver effect on divider
1 comment Created 18 days ago by eliasklughammerWhen you open the dropdown menu for the search history on a CPSearchField there is a mouseOver effect if you rollover the divider obove the "clear recent searches" option.
Screenshot:

Comments
It seems to be a bug in CPMenuItem: separator items should be disabled by default states the cocoa doc.
Fix:
http://github.com/cacaodev/cappuccino/commit/25e4178d46b6a03ff79df9e7a865b2ae573f75ba -
CPBundle bundleForClass sometimes returns the AppKit bundle
2 comments Created 16 days ago by klaaspieterCPBundle bundleForClass will return the AppKit bundle when it's being used for with an AppKit class.
For example when initializing a window controller with the initWithWindowCibName: initializer the owner is set to self. Because of this the windowCibPath method will ask for the bundle of CPWindowController which technically is the AppKit bundle, but should probably be the application bundle itself.Currently I don't think it's possible to use initWithWindowCibName because it will always look in the AppKit resources directory for the cib.
For an example take a look at gist
Comments
Typically the way you should do this is subclass CPWindowController and override windowCibName. At that point, the bundle will also be correct.
klaaspieter
Wed Nov 18 01:18:54 -0800 2009
| link
I agree, but it should technically be possible to load a window using just CPWindowController. Currently that is only possible if you place the cib in the AppKit resources directory.
-
There is situation when hasSuffix returns wrong result:
var string = @"Test";
var suffix = @"Wrong";
var result = [string hasSuffix:suffix];
Returned result is equal to YES ...
Problem appears always when [string length] == [suffix length]-1
Comments
jmacmullin
Wed Nov 04 21:46:09 -0800 2009
| link
A potential fix is here:
http://github.com/jmacmullin/cappuccino/commit/b6a42d3aac3d44985103d3cfb84f2fb3e610175f -
I receive error loading cappuccino-based apps on Opera. For demos like LightsOff, FlickrPhotoDemo Opera reports the same error too.
Browser:
Opera
Version 9.20
Build 3622
Platform MacOS X
System 10.5.7Error:
JavaScript - http://cappuccino.org/learn/demos/LightsOff/
Inline script compilation
Syntax error while loading: line 319 of linked script at http://cappuccino.org/learn/demos/Frameworks/Objective-J/Objective-J.js :
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\uComments
-
Pulldown and Popup controls currently don't support navigating with the arrow keys or the scroll bar. Nor do they support deactivation with the escape key.
Comments
-
As an example, compare scrolling the sidebar in iTunes with a large number of playlists with scrolling the widgets library in Mockingbird (http://gomockingbird.com/mockingbird/). iTunes will speed up the scrolling when you perform small, quick scrolling motions, or longer, slower scrolling motions.
Comments
I am not able to understand this issue. I don't see any special behavior in iTunes. Could you make a video?
Sure, here's a quick video: http://exygeninteractive.com/ScrollView.mov
It's difficult to explain, but it seems that native scroll bars in OS X have some logic that cause them to scroll greater distances bases on the length, speed and repetition of the scrolling gesture.
I'm using the two finger scrolling gesture on a MacBook Pro trackpad. I haven't compared it using a mouse scroll wheel.
-
CPTextField sends action to often in Firefox
2 comments Created 10 days ago by klaaspieterFirefox (and Opera) sent the keypress event to often which causes the textfield to sent it's action more than once when the enter key is pressed.
Comments
Could you try it against the jake branch? There have been some updates.
klaaspieter
Wed Nov 18 01:15:10 -0800 2009
| link
This is fixed on the jake branch.
-
CPTableView grids aren't redrawn when scrolling
1 comment Created 8 days ago by sethtrainI have CPTableView within a CPScrollView, when I resize the window the table view redraws the grids correctly but they aren't redrawn correctly when scrolling the scroll view.
I have created a video of this happening, sorry if you can't tell.
Comments
-
Hi, here is my config on Snow Leopard 10.6.2:
$gcc -v Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5646.1~2/src/configure --disable-checking --enable-
werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --
program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-
apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 --program-prefix=i686-apple-
darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5646) (dot 1)$java -v java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-237-10M3013)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-100, mixed mode)$git --version git --version
git version 1.6.4.2$rake --version rake, version 0.8.7
$echo $CAPP_BUILD /Library/Frameworks/cappuccino.framework
I clone cappuccino from github, I do a rake install and I get:
(in /Users/fred/dev/src/cappuccino.src) (in /Users/fred/dev/src/cappuccino.src) (in /Users/fred/dev/src/cappuccino.src/External) Submodule 'External/browserjs' (git://github.com/tlrobinson/browserjs.git) registered for path
'External/browserjs' Submodule 'External/jack' (git://github.com/tlrobinson/jack.git) registered for path
'External/jack' Submodule 'External/narwhal' (git://github.com/tlrobinson/narwhal.git) registered for path
'External/narwhal' Submodule 'External/ojunit' (git://github.com/280north/ojunit.git) registered for path
'External/ojunit' Initialized empty Git repository in /Users/fred/dev/src/cappuccino.src/External/browserjs/.git/
remote: Counting objects: 120, done.
remote: Compressing objects: 100% (103/103), done.
remote: Total 120 (delta 38), reused 0 (delta 0)
Receiving objects: 100% (120/120), 22.55 KiB, done.
Resolving deltas: 100% (38/38), done.
Submodule path 'External/browserjs': checked out
'98a71a4122bde9cacebe5b437e66c4b17208a195' Initialized empty Git repository in /Users/fred/dev/src/cappuccino.src/External/jack/.git/
remote: Counting objects: 2614, done.
remote: Compressing objects: 100% (1357/1357), done.
remote: Total 2614 (delta 1478), reused 2089 (delta 1179)
Receiving objects: 100% (2614/2614), 866.16 KiB | 226 KiB/s, done.
Resolving deltas: 100% (1478/1478), done.
Submodule path 'External/jack': checked out '3ee7b56812c97770318891a0fd21287cae9ccfc2'
Initialized empty Git repository in /Users/fred/dev/src/cappuccino.src/External/narwhal/.git/
remote: Counting objects: 7149, done.
remote: Compressing objects: 100% (2287/2287), done.
remote: Total 7149 (delta 4600), reused 7149 (delta 4600)
Receiving objects: 100% (7149/7149), 4.21 MiB | 229 KiB/s, done.
Resolving deltas: 100% (4600/4600), done.
Submodule path 'External/narwhal': checked out 'cd6e4b02ab7f039e2f106ef6f8edb3efbfab5b8a'
Initialized empty Git repository in /Users/fred/dev/src/cappuccino.src/External/ojunit/.git/
remote: Counting objects: 80, done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 80 (delta 38), reused 0 (delta 0)
Receiving objects: 100% (80/80), 12.50 KiB, done.
Resolving deltas: 100% (38/38), done.
Submodule path 'External/ojunit': checked out
'352b7e8c618729a48d130098368ae0a774ce5f0d' mkdir -p /Library/Frameworks/cappuccino.framework/Debug
mkdir -p /Library/Frameworks/cappuccino.framework/Debug/env
rm -rf /Library/Frameworks/cappuccino.framework/Debug/env
(in /Users/fred/dev/src/cappuccino.src/Objective-J) mkdir -p /Library/Frameworks/cappuccino.framework/Debug/Objective-J
:576:26: warning: missing terminating " character
:840:26: warning: missing terminating " character
:841:22: warning: missing terminating " character
mkdir -p /Library/Frameworks/cappuccino.framework/Debug/Objective-J/rhino.platform
:576:26: warning: missing terminating " character
:840:26: warning: missing terminating " character
:841:22: warning: missing terminating " character
cp /Users/fred/dev/src/cappuccino.src/Tools/Rake/lib/licenses/LGPL-v2.1
/Library/Frameworks/cappuccino.framework/Debug/Objective-J/LICENSE (in /Users/fred/dev/src/cappuccino.src/Objective-J/Tools) rm -rf /Library/Frameworks/cappuccino.framework/Debug/env/packages/objj
cp -r objj /Library/Frameworks/cappuccino.framework/Debug/env/packages/objj
mkdir -p
/Library/Frameworks/cappuccino.framework/Debug/env/packages/objj/lib/Frameworks rm -rf
/Library/Frameworks/cappuccino.framework/Debug/env/packages/objj/lib/Frameworks/Objecti ve-J
cp -r /Library/Frameworks/cappuccino.framework/Debug/Objective-J
/Library/Frameworks/cappuccino.framework/Debug/env/packages/objj/lib/Frameworks/Objecti ve-J
(in /Users/fred/dev/src/cappuccino.src/Foundation) mkdir -p /Library/Frameworks/cappuccino.framework/Debug/Foundation/Resources
cp -r Resources/log.css
/Library/Frameworks/cappuccino.framework/Debug/Foundation/Resources/log.css Exception in thread "main" java.lang.NullPointerException
at org.mozilla.javascript.ScriptableObject.getTopLevelScope(ScriptableObject.java:1514) at org.mozilla.javascript.ScriptRuntime.setObjectProtoAndParent(ScriptRuntime.java:3291) at org.mozilla.javascript.NativeJavaPackage.getPkgProperty(NativeJavaPackage.java:166) at org.mozilla.javascript.NativeJavaPackage.get(NativeJavaPackage.java:105) at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1575) at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1397) at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1383) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3054) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2484) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162) at org.mozilla.javascript.NativeArray.iterativeMethod(NativeArray.java:1565) at org.mozilla.javascript.NativeArray.execIdCall(NativeArray.java:313) at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3335) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2484) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162) at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97) at org.mozilla.javascript.gen.c1._c1(Unknown Source) at org.mozilla.javascript.gen.c1.call(Unknown Source) at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76) at org.mozilla.javascript.gen.c1._c0(Unknown Source) at org.mozilla.javascript.gen.c1.call(Unknown Source) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003) at org.mozilla.javascript.gen.c1.call(Unknown Source) at org.mozilla.javascript.gen.c1.exec(Unknown Source) at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:526) at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:448) at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:414) at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:405) at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:179) at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:100) at org.mozilla.javascript.Context.call(Context.java:499) at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:511) at org.mozilla.javascript.tools.shell.Main.exec(Main.java:162) at org.mozilla.javascript.tools.shell.Main.main(Main.java:140)Can anyone point me in the right direction?
Cheers, Fred.Comments
-
This is not very surprising as the objj-analysis-tools.j file contains reference to rhino.platform/Objective-J.js, /Users/tlrobinson/... and use things like Packages.java.xxx that narwhal-jsc does not like.
Comments
-
CPTextField as "initialFirstResponder" in non-nib app not working
0 comments Created 4 days ago by luddepHello,
setting CPTextField as the firstResponder within -(void)applicationDidFinishLaunching sets focus on the textfield, but it wont respond to any keyboard events unless you click it again or make it the firstResponder through another event (such as a button click).
Strangely, it works if you set the initialFirstResponder connection in Atlas which just runs makeFirstResponder: under the hood.
Test case available at http://luddep.se/static/MakeFirstResponderBug/
(running latest jake branch checkout, for the record)
Comments
-
Added support for windows with a mask = CPDocModalWindowMask | CPHUDBackgroundWindowMask used for HUD attached sheets. Updated the AttachedSheets test app.
http://github.com/cacaodev/cappuccino/commit/eecc3b84dc607b71d5b76d9682fafc077a624e6c
Comments
-
In jake branch, copy and paste within CPTextField doesn't work
0 comments Created 2 days ago by saikatI believe this only occurs when the Cappuccino application has menu items with key equivalents for copy and paste. With the new way CPTextField works, these key equivalents get caught in CPApplication, I believe, and never hit the CPTextField. Not sure what the proper solution is.
Comments
-
from IRC:
saikatc: tlrobinson: btw, i just realized that after running bootstrap.sh, restarting the shell won't work as expected if the user has a .bash_profile or .bash_login. it should probably add the export path to the correct profile based on the unix priority order - http://hayne.net/MacDev/Notes/unixFAQ.html under "Bash startup files"
Comments
-
Test case:
var zero = [CPNumber numberWithInt:0]; var set = [CPSet setWithObject:zero]; CPLog.trace(@"containsObject: %d", [set containsObject:zero]);Oops :-(
if (_contents[[anObject UID]] && [_contents[[anObject UID]] isEqual:anObject])should be replaced with
if ([anObject UID] in _contents && [_contents[[anObject UID]] isEqual:anObject])Comments
-
Currently there isn't a "good" way to save a document with CPSavePanel (non native mode)
0 comments Created about 23 hours ago by sethtrainCPSavePanel looks like it is setup so that it doesn't pass proposedFileURLWithDocumentName: to the document but calls it from itself. Seems like a bad place to have to implement this method.
Comments
-
Theres a bug in ie7 and ie8 when using 1x1 pixel transparent images for backgrounds. This is happening with the HUD window style. All that needs to be done is change the 1x1 pixel file to be a 5x5 pixel file.
Comments
-
If the CPTableView is first responder and you do something like "cmd+s" to save (a menu shortcut) the tableview doesn't handle the keyboard event correctly.
Comments
- #acknowledged▾
- #external-webkit▾
- #needanswer▾
- #needtest▾
- #to-acknowledge▾
- #to-review▾
- @boucher▾
- @tlrobinson▾
- @tolmasky▾
- Bug▾
- Feature▾
- Objective-J▾
- Regression▾
- Task▾
- appkit▾
- foundation▾
- from-lighthouse▾
- tools▾
- Apply to Selection
-
Change Color…
Preview:preview
- Rename…
- Delete












Plist parser fails on IE8 when there’s no DTD header in XML
Patch to fix the issue. Tested on IE8 (in both IE8 and IE7 modes).
by Farcaller
Commited at farcaller/cappuccino@b91a959