Meta_Pen:color_ was:Re: [sc-users] BoxGrid scroll
thor
th.list at gmail.com
Thu Oct 4 01:16:41 PDT 2007
Hey Jan
> OK,
> this class extension does it:
>
> +Pen {
>
> *color_{|color|
> color.set
> }
> }
That's it.
> might be that it is somewhere in SwingOsc?
Yes, and I've got it also in a file called extPen in one of Fredrik's
quarks.
(so that was the reason ParaSpace still worked even when I removed the
SwingOSC library).
> but i guess it should be moved into the sf svn.
Definitively. Otherwise we can't make cross platform code.
Perhaps Sciss will do that as it's his special domain?
Good that this was figured out.
(basically the ixiViews are now dependent on the SwingOSC or Fredriks
libraries : (
cheers
thor
> j
>
> On Oct 4, 2007, at 12:19 AM, thor wrote:
>
>> Hi Jan.
>>
>>> i'm not 100% sure, but i never saw Pen.color_ anywhere else than
>>> in your lib. (?)
>>
>> This is done for cross-platform purposes. SwingOSC does not support
>> Color.black.set;
>> You need to do
>> Pen.color = Color.black;
>>
>> Check this:
>>
>> GUI.cocoa;
>> // GUI.swing;
>>
>> (
>> w = GUI.window.new.front;
>> w.view.background_(Color.white);
>> w.drawHook = {
>> // set the Color
>> GUI.pen.translate(100, 100);
>> 40.do{
>> GUI.pen.color = Color.rand; // Pen.color = Color.rand; // works
>> as well on Cocoa
>> GUI.pen.addWedge((100.rand)@(100.rand), rrand(10, 100),
>> 2pi.rand, 2pi.rand);
>> GUI.pen.perform([\stroke, \fill].choose);
>> }
>> };
>> w.refresh;
>> )
>>
>> Actually, now thinking about this, could it be that the reason
>> this is not working
>> for you is that you haven't got SwingOSC installed? (I doubt it,
>> because I removed
>> the SwingOSC classes and the ixi classes still work).
>>
>> Are you perhaps using a build so old that the GUI class is not in it?
>>
>>> could you check where it is defined in your installation?
>>
>> I've checked my ParaSpace class all over. And it works fine here
>> on both
>> SwingOSC and Cocoa. Perhaps Fabrice can try. Or someone else?
>>
>>> another thing ... where can i get an intel LoopBuf ?
>>
>> It's in LancePutnams classes on realizedsounds
>> Find it in ljpclasses here:
>> http://sourceforge.net/project/showfiles.php?group_id=182627
>>
>> good luck
>> thor
>>
>>
>>>
>>>
>>> On Oct 3, 2007, at 11:16 PM, thor wrote:
>>>
>>>>
>>>> Hey Jan
>>>>
>>>> I've tried ParaSpace now on both SwingOSC and Cocoa and everything
>>>> works fine here.
>>>>
>>>> Are the other classes working? And why is Pen not understanding
>>>> color_? Could this be something you've changed on your system?
>>>>
>>>> ???
>>>> thor
>>>>
>>>>
>>>>> i get this error trying to run ParaSpace from your lib:
>>>>>
>>>>> ERROR: Message 'color_' not understood.
>>>>> RECEIVER:
>>>>> class Pen (16FE18D0) {
>>>>> instance variables [19]
>>>>> name : Symbol 'Pen'
>>>>> nextclass : class Penv (17CFBD80)
>>>>> superclass : Symbol 'Object'
>>>>> subclasses : nil
>>>>> methods : nil
>>>>> instVarNames : nil
>>>>> classVarNames : nil
>>>>> iprototype : nil
>>>>> cprototype : nil
>>>>> constNames : nil
>>>>> constValues : nil
>>>>> instanceFormat : Integer 0
>>>>> instanceFlags : Integer 0
>>>>> classIndex : Integer 445
>>>>> classFlags : Integer 0
>>>>> maxSubclassIndex : Integer 445
>>>>> filenameSymbol : Symbol '/Users/Shared/App/SC3/
>>>>> SCClassLibrary/Common/GUI/Base/Pen.sc'
>>>>> charPos : Integer 0
>>>>> classVarIndex : Integer 155
>>>>> }
>>>>> ARGS:
>>>>> Instance of Color { (16D79CC0, gc=9C, fmt=00, flg=00, set=02)
>>>>> instance variables [4]
>>>>> red : Float 0.0 00000000 00000000
>>>>> green : Float 1.0 3FF00000 00000000
>>>>> blue : Float 0.0 00000000 00000000
>>>>> alpha : Float 0.2 3FC99999 9999999A
>>>>> }
>>>>> CALL STACK:
>>>>> DoesNotUnderstandError:reportError 16F90120
>>>>> arg this = <instance of DoesNotUnderstandError>
>>>>> Nil:handleError 16F45B90
>>>>> arg this = nil
>>>>> arg error = <instance of DoesNotUnderstandError>
>>>>> Thread:handleError 16F8B330
>>>>> arg this = <instance of Thread>
>>>>> arg error = <instance of DoesNotUnderstandError>
>>>>> Object:throw 16F7CC80
>>>>> arg this = <instance of DoesNotUnderstandError>
>>>>> Object:doesNotUnderstand 16F783A0
>>>>> arg this = class Pen
>>>>> arg selector = 'color_'
>>>>> arg args = [*1]
>>>>> < FunctionDef in Method ParaSpace:initParaSpace > (no
>>>>> arguments or variables)
>>>>> SCUserView:draw 15BCC610
>>>>> arg this = <instance of SCUserView>
>>>>>
>>>>> On Oct 3, 2007, at 10:31 PM, thor wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>>> What is the best way to scroll a BoxGrid?
>>>>>>
>>>>>> Hi Fabrice
>>>>>>
>>>>>> I've now checked if this works. You have to update your
>>>>>> ixiViews quarks or download the classes from the ixi website
>>>>>> again.
>>>>>>
>>>>>> http://www.ixi-audio.net/backyard
>>>>>>
>>>>>> The following code works fine here:
>>>>>>
>>>>>> Let me know if you have any problems
>>>>>> thor
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> // MIDIKeyboard
>>>>>> (
>>>>>> a = SCWindow.new;
>>>>>> b = SCScrollView(a, Rect(0,0,150,100));
>>>>>> c = MIDIKeyboard(b, Rect(0,0, 400, 400), 3, 10);
>>>>>> a.front;
>>>>>> )
>>>>>>
>>>>>>
>>>>>> // BoxGrid
>>>>>> (
>>>>>> a = SCWindow.new;
>>>>>> b = SCScrollView(a, Rect(0,0,150,100));
>>>>>> c = BoxGrid(b, Rect(0,0, 400, 400), 30, 10);
>>>>>> a.front;
>>>>>> )
>>>>>>
>>>>>>
>>>>>> // Grid
>>>>>> (
>>>>>> a = SCWindow.new;
>>>>>> b = SCScrollView(a, Rect(0,0,150,100));
>>>>>> c = Grid(b, Rect(0,0, 400, 400), 30, 10);
>>>>>> a.front;
>>>>>> )
>>>>>>
>>>>>>
>>>>>> // ParaSpace
>>>>>> (
>>>>>> a = SCWindow.new;
>>>>>> b = SCScrollView(a, Rect(0,0,150,100));
>>>>>> c = ParaSpace.new(b, Rect(0,0, 400, 400));
>>>>>> a.front;
>>>>>> )
>>>>>>
>>>>>> _______________________________________________
>>>>>> sc-users mailing list
>>>>>> sc-users at create.ucsb.edu
>>>>>> http://www.create.ucsb.edu/mailman/listinfo/sc-users
>>>>>
>>>>> _______________________________________________
>>>>> sc-users mailing list
>>>>> sc-users at create.ucsb.edu
>>>>> http://www.create.ucsb.edu/mailman/listinfo/sc-users
>>>>
>>>> _______________________________________________
>>>> sc-users mailing list
>>>> sc-users at create.ucsb.edu
>>>> http://www.create.ucsb.edu/mailman/listinfo/sc-users
>>>
>>> _______________________________________________
>>> sc-users mailing list
>>> sc-users at create.ucsb.edu
>>> http://www.create.ucsb.edu/mailman/listinfo/sc-users
>>
>> _______________________________________________
>> sc-users mailing list
>> sc-users at create.ucsb.edu
>> http://www.create.ucsb.edu/mailman/listinfo/sc-users
>
> _______________________________________________
> sc-users mailing list
> sc-users at create.ucsb.edu
> http://www.create.ucsb.edu/mailman/listinfo/sc-users
More information about the sc-users
mailing list