Re: access subclass functions

2008-11-20 Thread Saaa
Thanks !! I miss university :'( >>> Informally, "virtual" means "can be overridden". It only applies to >>> methods on classes. This definition is informal and ambiguous. >> virtual functions are slowers because you have the extra step of >> vtable, right? >> How much of a difference can I expect

Re: Comment highlighting in Descent plugin

2008-11-20 Thread Bill Baxter
On Fri, Nov 21, 2008 at 1:13 PM, Robert Fraser <[EMAIL PROTECTED]> wrote: > Bill Baxter wrote: >> >> Why is every word in every comment underlined with a red squiggle? >> I see there's something called the "D spell checker" enabled. Is it >> broken? >> Disabling spell-checking makes the problem go

Re: access subclass functions

2008-11-20 Thread Christopher Wright
Saaa wrote: Informally, "virtual" means "can be overridden". It only applies to methods on classes. This definition is informal and ambiguous. virtual functions are slowers because you have the extra step of vtable, right? How much of a difference can I expect? Because it doesn't look like a lot

Re: how to use opdot

2008-11-20 Thread Christopher Wright
Steven Schveighoffer wrote: "Christopher Wright" wrote Steven Schveighoffer wrote: Not exactly ;) The wrapped type is not equivalent to inheritance. No, exactly: class Wrapper(T) : T { T opDot() {} } class Wrapper(T) : T { } works just as good ;) -Steve True, but with opDot, you can s

Re: Comment highlighting in Descent plugin

2008-11-20 Thread Robert Fraser
Bill Baxter wrote: Why is every word in every comment underlined with a red squiggle? I see there's something called the "D spell checker" enabled. Is it broken? Disabling spell-checking makes the problem go away (but only after I re-saved the file, which was rather unexpected... why should I ha

Re: access subclass functions

2008-11-20 Thread Saaa
> Informally, "virtual" means "can be overridden". It only applies to > methods on classes. This definition is informal and ambiguous. virtual functions are slowers because you have the extra step of vtable, right? How much of a difference can I expect? Because it doesn't look like a lot of work:

Comment highlighting in Descent plugin

2008-11-20 Thread Bill Baxter
Why is every word in every comment underlined with a red squiggle? I see there's something called the "D spell checker" enabled. Is it broken? Disabling spell-checking makes the problem go away (but only after I re-saved the file, which was rather unexpected... why should I have to save the file f

Re: Descent project file organization

2008-11-20 Thread Bill Baxter
On Fri, Nov 21, 2008 at 10:59 AM, Ary Borenszweig <[EMAIL PROTECTED]> wrote: > If you don't want to move your files and keep them where they are, create a > new D project and in the first page of the wizard select "from existing > source" and type or select the folder where your files are. That wil

Re: Descent project file organization

2008-11-20 Thread Ary Borenszweig
Ary Borenszweig escribió: If you don't want to move your files and keep them where they are, create a new D project and in the first page of the wizard select "from existing source" and type or select the folder where your files are. That will ~ add ~ two files in that directory: .project a

Re: Descent project file organization

2008-11-20 Thread Ary Borenszweig
If you don't want to move your files and keep them where they are, create a new D project and in the first page of the wizard select "from existing source" and type or select the folder where your files are. That will two files in that directory: .project and .classpath. But that's it. I hope t

Descent project file organization

2008-11-20 Thread Bill Baxter
I think I figured out the answer to my last question about installing Descent. It seems I can just copy the plugins and features directories from the Descent .zip over top the ones in in the Eclipse folder. The next question is about file organization. I'm thinking it might be nice to Descent as

Re: access subclass functions

2008-11-20 Thread Jarrett Billingsley
On Thu, Nov 20, 2008 at 7:35 PM, Christopher Wright <[EMAIL PROTECTED]> wrote: > [1] It's a bit of a stretch to grant them this name, but if life gives you > lemmas, make lemma-ade. > OhhhHH I think my head just exploded.

Re: how to use opdot

2008-11-20 Thread Steven Schveighoffer
"Christopher Wright" wrote > Steven Schveighoffer wrote: >> Not exactly ;) The wrapped type is not equivalent to inheritance. > > No, exactly: > > class Wrapper(T) : T > { > T opDot() {} > } class Wrapper(T) : T { } works just as good ;) -Steve

Re: access subclass functions

2008-11-20 Thread Christopher Wright
Saaa wrote: from the list (private, protected, public) pick public. Note the difference between peel and peal. :) public YellowBanana: Banana { void doStuff() { bool e = peel(); //visible from derived //class when defined protected or public. } } Banana a = ne

Re: how to use opdot

2008-11-20 Thread Christopher Wright
Steven Schveighoffer wrote: Not exactly ;) The wrapped type is not equivalent to inheritance. No, exactly: class Wrapper(T) : T { T opDot() {} }

Re: Compilation error when using a extern function ?

2008-11-20 Thread Denis Koroskin
21.11.08 в 01:57 tsalm в своём письме писал(а): Hello, I'm on DMD 1.036. When I'm compiling this code : // -CODE--- enum ColorValues:uint { AliceBlue = 0xF0F8 ,AntiqueWhite = 0xF8ECD8FF ,Aqua = 0x00FF ,Aquamarine = 0x80FFD0FF

Compilation error when using a extern function ?

2008-11-20 Thread tsalm
Hello, I'm on DMD 1.036. When I'm compiling this code : // -CODE--- enum ColorValues:uint { AliceBlue = 0xF0F8 ,AntiqueWhite = 0xF8ECD8FF ,Aqua = 0x00FF ,Aquamarine = 0x80FFD0FF ,Azure = 0xF0FF ,Beige = 0xF8F4E0FF

Re: access subclass functions

2008-11-20 Thread BCS
Reply to Saaa, b=cast(Banana)fruits[1].peel(); I'm not shure that will work. IIRC DMD reads that as b=cast(Banana)( fruits[1].peel() );

Re: how to use opdot

2008-11-20 Thread Morusaka
Steven Schveighoffer Wrote: > opDot is useful if you want to make a 'wrapper' type. That is, you want to > mimic another type, but you want to slightly alter the behavior. opDot > allows you to 'inherit' all the member functions and fields from the wrapped > type. For example, if I wanted to

Need help with DWIN and creating deskband objects in IE

2008-11-20 Thread sleek
I have attached some code that has been written to take advantage of DWIN and implement a DeskBand object for Internet Explorer. The DLL that is built seems to be able to hook into IE without issue. The deskband is visible once selected from the IE toolbar menu. However, in IE 7, when multiple tabs

Re: access subclass functions

2008-11-20 Thread Saaa
"Kagamin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Saaa Wrote: > >> In stead of numbers I use an enum, which makes it really difficult to get >> this wrong: >> fruits[BANANA].peel(); > > why not using struct? How do you mean? What should be a struct?

Re: access subclass functions

2008-11-20 Thread Saaa
> > > from the list (private, protected, public) pick public. > Note the difference between peel and peal. :) > > > public YellowBanana: Banana > { > void doStuff() > { > bool e = peel(); //visible from derived >//class when defined protected or public. > } > } > >

Re: access subclass functions

2008-11-20 Thread Kagamin
Saaa Wrote: > In stead of numbers I use an enum, which makes it really difficult to get > this wrong: > fruits[BANANA].peel(); why not using struct?

Re: access subclass functions

2008-11-20 Thread Saaa
My bad, I meant: b=cast(Banana)fruits[1].peel(); "Steven Schveighoffer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Saaa" wrote >>> (and your example doesn't reflect the error messages), >> How do you mean? Like not at all? >> As you noticed it isn't the actual code, but I th

Re: access subclass functions

2008-11-20 Thread Steven Schveighoffer
"Saaa" wrote >> (and your example doesn't reflect the error messages), > How do you mean? Like not at all? > As you noticed it isn't the actual code, but I thought it would reflect it > though. I mean, you have some cast error, but there is no casting in your code sample. -Steve

Re: access subclass functions

2008-11-20 Thread sclytrack
== Quote from Saaa ([EMAIL PROTECTED])'s article > Is this not possible, or am I doing anything wrong? > Fruit[2] fruits; // Fruit has no peel function > fruit[0]= new Apple(); > fruit[1]= new Banana(); //Banana has a protected peel() function returning a > bool > bool b; > b=fruit[1].peal(); > Err

Re: access subclass functions

2008-11-20 Thread Saaa
> > I think you have a typo in your example :) > (and your example doesn't reflect the error messages), How do you mean? Like not at all? As you noticed it isn't the actual code, but I thought it would reflect it though. > but that isn't the problem. > > In a strongly typed language, you cannot

Re: how to use opdot

2008-11-20 Thread Ary Borenszweig
Steven Schveighoffer wrote: "Ary Borenszweig" wrote Steven Schveighoffer wrote: "Morusaka" wrote Hi, I've read about opdot in D language spec operator overload section, but the little snippet of code provided isn't enough, for me, to figure out what it is supposed to do and how to use it or

Re: how to use opdot

2008-11-20 Thread Steven Schveighoffer
"Ary Borenszweig" wrote > Steven Schveighoffer wrote: >> "Morusaka" wrote >>> Hi, >>> >>> I've read about opdot in D language spec operator overload section, but >>> the little snippet of code provided isn't enough, for me, to figure out >>> what it is supposed to do and how to use it or what it

Re: access subclass functions

2008-11-20 Thread Steven Schveighoffer
"Saaa" wrote > Is this not possible, or am I doing anything wrong? > > Fruit[2] fruits; // Fruit has no peel function > > fruit[0]= new Apple(); > fruit[1]= new Banana(); //Banana has a protected peel() function returning > a bool > > bool b; > b=fruit[1].peal(); > > Error: no property 'peel' for

Re: how to use opdot

2008-11-20 Thread Ary Borenszweig
Steven Schveighoffer wrote: "Morusaka" wrote Hi, I've read about opdot in D language spec operator overload section, but the little snippet of code provided isn't enough, for me, to figure out what it is supposed to do and how to use it or what it could be usefull for. Could you please hel

access subclass functions

2008-11-20 Thread Saaa
Is this not possible, or am I doing anything wrong? Fruit[2] fruits; // Fruit has no peel function fruit[0]= new Apple(); fruit[1]= new Banana(); //Banana has a protected peel() function returning a bool bool b; b=fruit[1].peal(); Error: no property 'peel' for type 'project.fruitclass.Fruit' E

Re: new to D2.0 , invariant problem

2008-11-20 Thread Steven Schveighoffer
"MikeRJ" wrote > For some reason i think DM 1.0 is slowly dieing as i see tons of new > features in D 2.0's phobos not implemented in D 1.0 so im trying to > migrate to D2.0 > > my 1st problem is when i compile code: > > bool open(char[] fn, char[] mode="rb") > { > filename=fn.dup; > file = fope

Re: how to use opdot

2008-11-20 Thread Steven Schveighoffer
"Morusaka" wrote > Hi, > > I've read about opdot in D language spec operator overload section, but > the little snippet of code provided isn't enough, for me, to figure out > what it is supposed to do and how to use it or what it could be usefull > for. > > Could you please help me to get the ri

Re: new to D2.0 , invariant problem

2008-11-20 Thread Kagamin
MikeRJ Wrote: > bool open(char[] fn, char[] mode="rb") > { > filename=fn.dup; > file = fopen(toStringz(filename), toStringz(mode)); > if (!file) return false; > return true; > } D1 and D2 compatible code: bool open

Re: how to use opdot

2008-11-20 Thread Kagamin
Hoenir Wrote: > But I can't currently imagine any way to use this either. it will be useful when implementing auto_ptr, shared_ptr and likes.