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

Re: [sc-dev] SC -> c++ interface

Im trying to implement a color for each channel in a
scope. So i have the following method insice the
SCUMScope class

    setChannelsColors { | array |
        array.size.do( {arg i;
             this.setChannelColor(i , array.at(i));

 setChannelColor(int , SCUM_Color ) is defined in
SCUM_Graph.hh/cpp like

declared as members of SCUM_Scope

   virtual void setChannelColor(int ch , SCUM_Color

  std::vector<SCUM_Color>         Ch_colors;

void SCUM_Scope::setChannelColor(int ch, SCUM_Color
col) //im not sure if it should be by value or by  
    //reference, not sure what the garbage collection
   //policy is for SCUM_Color
  if (Ch_colors.size() <= ch)
  Ch_colors[ch] = col;

So, i am calling the C++ method from the sc class, but
when i do it says the 'setChannelColor' message not
understood (the C++ class)

 --- stefan kersten <steve@xxxxxxxxxx> escribió: 
> On Tue, Nov 23, 2004 at 01:32:42AM -0300, Charlls
> Quarra wrote:
> >  Im playing with a external library (SCUM), I
> wrote a
> > new c++ method in a class (SCUM_SCope) and now i
> want
> > to use it from  SCUMScope.sc, but it says that the
> > method in question is "not understood". Im sure im
> > changing the same code im running since if i do a
> > modification in other calls it gets reflected on
> my
> > session. What i have to do to make the .sc
> interface
> > to see a new c++ method?
> > 
> > I've been looking and it seems it has something to
> do
> > with a thing called PyrPrim, but no idea what to
> do
> > with it or how to use it
> have a look at src/SCUM_Prim.cpp, all SCUM
> primitives are
> implemented there. you will also have to write a
> method in
> SCUMScope.sc that calls the primitive you
> implemented.
> depending on what you want to do it might be better
> to
> implement your method as a property/attribute in
> SCUM_Scope::setProperty.
> hth,
> <sk>
> _______________________________________________
> sc-dev mailing list
> sc-dev@xxxxxxxxxxxxxxx
> http://www.create.ucsb.edu/mailman/listinfo/sc-dev

Running on:
1.5 Ghz P4
asus v800x chipset
RH9 CCRMA-patched linux


¡Llevate a Yahoo! en tu Unifón! 
Ahora podés usar Yahoo! Messenger en tu Unifón, en cualquier momento y lugar. 
Encontrá más información en: http://ar.mobile.yahoo.com/sms.html