gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gorm, NSCollectionView


From: Gregory Casamento
Subject: Re: Gorm, NSCollectionView
Date: Sat, 13 Apr 2013 10:44:47 -0400

Fred,

I will be working on getting those files merged this weekend for the new classes.  I was very busy last week.  I'll advise as to my progress.

GC


On Sat, Apr 13, 2013 at 4:41 AM, Fred Kiefer <address@hidden> wrote:
On 12.04.2013 23:52, address@hidden wrote:
Hi,

I would lile to open a xib file created under Xcode and that has an
empty NSCollectionView, how can I slightly
modify the GSXibKeyedUnarchiver to ignore this object or to display a
dummy view ?
Here is an extract of the xib file :

<object class="NSScrollView" id="484370537">
     <reference key="NSNextResponder" ref="462115558"/>
     <int key="NSvFlags">-2147483382</int>
     <object class="NSMutableArray" key="NSSubviews">
         <bool key="EncodedWithXMLCoder">YES</bool>
         <object class="NSClipView" id="204776699">
             <reference key="NSNextResponder" ref="484370537"/>
             <int key="NSvFlags">2304</int>
             <object class="NSMutableArray" key="NSSubviews">
                 <bool key="EncodedWithXMLCoder">YES</bool>
                 <object class="NSCollectionView" id="898315540">
                     <reference key="NSNextResponder" ref="204776699"/>
                     <int key="NSvFlags">310</int>
                     <string key="NSFrameSize">{618, 0}</string>
                     <reference key="NSSuperview" ref="204776699"/>
                     <reference key="NSWindow"/>
                     <reference key="NSNextKeyView" ref="138269728"/>
                     <string key="NSReuseIdentifierKey">_NS:3367</string>
                     <string key="NSMinGridSize">{0, 0}</string>
                     <string key="NSMaxGridSize">{0, 0}</string>
                     <int key="NSMaxNumberOfGridRows">0</int>
                     <int key="NSMaxNumberOfGridColumns">0</int>
                     <object class="NSArray" key="NSBackgroundColors">
                         <bool key="EncodedWithXMLCoder">YES</bool>
                         <object class="NSColor" id="293407392">
                             <int key="NSColorSpace">4</int>
                             <bytes key="NSWhite">MSAwAA</bytes>
                         </object>
                     </object>
                     <int key="NSDraggingSourceMaskForLocal">-1</int>
                     <int key="NSDraggingSourceMaskForNonLocal">0</int>
                 </object>
             </object>
             <string key="NSFrameSize">{618, 0}</string>
             <reference key="NSSuperview" ref="484370537"/>
             <reference key="NSWindow"/>
             <reference key="NSNextKeyView" ref="898315540"/>
             <string key="NSReuseIdentifierKey">_NS:3365</string>
             <reference key="NSDocView" ref="898315540"/>
             <object class="NSColor" key="NSBGColor" id="985601461">
                 <int key="NSColorSpace">6</int>
                 <string key="NSCatalogName">System</string>
                 <string key="NSColorName">controlColor</string>
                 <object class="NSColor" key="NSColor">
                     <int key="NSColorSpace">3</int>
                     <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
                 </object>
             </object>
             <int key="NScvFlags">2</int>
         </object>
         <object class="NSScroller" id="138269728">
             <reference key="NSNextResponder" ref="484370537"/>
             <int key="NSvFlags">-2147483392</int>
             <string key="NSFrame">{{234, 1}, {15, 143}}</string>
             <reference key="NSSuperview" ref="484370537"/>
             <reference key="NSWindow"/>
             <reference key="NSNextKeyView" ref="876693224"/>
             <string key="NSReuseIdentifierKey">_NS:3372</string>
             <reference key="NSTarget" ref="484370537"/>
             <string key="NSAction">_doScroller:</string>
             <double key="NSCurValue">1</double>
             <double key="NSPercent">0.89655172824859619</double>
         </object>
         <object class="NSScroller" id="876693224">
             <reference key="NSNextResponder" ref="484370537"/>
             <int key="NSvFlags">-2147483392</int>
             <string key="NSFrame">{{1, 144}, {233, 15}}</string>
             <reference key="NSSuperview" ref="484370537"/>
             <reference key="NSWindow"/>
             <reference key="NSNextKeyView" ref="402299358"/>
             <string key="NSReuseIdentifierKey">_NS:3374</string>
             <int key="NSsFlags">1</int>
             <reference key="NSTarget" ref="484370537"/>
             <string key="NSAction">_doScroller:</string>
             <double key="NSPercent">0.63157892227172852</double>
         </object>
     </object>
     <string key="NSFrame">{{0, 373}, {618, 0}}</string>
     <reference key="NSSuperview" ref="462115558"/>
     <reference key="NSWindow"/>
     <reference key="NSNextKeyView" ref="204776699"/>
     <string key="NSReuseIdentifierKey">_NS:3363</string>
     <int key="NSsFlags">133680</int>
     <reference key="NSVScroller" ref="138269728"/>
     <reference key="NSHScroller" ref="876693224"/>
     <reference key="NSContentView" ref="204776699"/>
</object>

Actually my goal is only to see what this xib file looks like inside
Gorm and not to edit or change any properties.
Could it be done by a quick and dirty hack ?
Could I substitute the NSCollectionView by a NSCustomView during xml
parsing ?

I am fed up with switching between my pc and my mac mini ...

If you want do do this in code the simplest way to replace a class is calling the class method setClass:forClassName: on NSKeyedUnarchiver, replacing NSCollectionView with NSView. Of course you could do the same by editing the XIB file.

But for NSCollectionView there is an even better solution. We already have code for this in the GNUstep repository, it is in the testplant branch. Gregory wanted to merge these files (and a lot more) over the last weekend. Looks like he didn't get around to do this. I could easily add these files myself, but I am not sure whether this is OK for Greg.
If you just need NSCollectionView for a test, switch to that branch and compile gui from there.

Fred



_______________________________________________
Gnustep-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/gnustep-dev



--
Gregory Casamento
Open Logic Corporation, Principal Consultant
yahoo/skype: greg_casamento, aol: gjcasa
(240)274-9630 (Cell)
http://www.gnustep.org
http://heronsperch.blogspot.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]