Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Custom Classes and Constructors (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Re: [OT] Different Colas (was: Custom Classes and Constructors)
Next thread: Inline HTTP 1.6 beta


Getting ListBox Cell Left and Top   -   Rubber Chicken Software Co.
  Custom Classes and Constructors   -   ss2 cire
   Re: Custom Classes and Constructors   -   Norman Palardy
   Re: Custom Classes and Constructors   -   Kirk Gray
    [OT]Re: Custom Classes and Constructors   -   RPEHLM
   Re: Custom Classes and Constructors   -   Terry Ford
   Re: Custom Classes and Constructors   -   Norman Palardy
    Re: Custom Classes and Constructors   -   RPEHLM
   Re: Custom Classes and Constructors   -   Kirk Gray
   Re: Custom Classes and Constructors   -   Norman Palardy
   Re: Custom Classes and Constructors   -   Norman Palardy
    Re: Custom Classes and Constructors   -   RPEHLM
     Re: Custom Classes and Constructors   -   Dirk Cleenwerck
      Re: [OT] Different Colas (was: Custom Classes and Constructors)   -   Metsis
   Re: Custom Classes and Constructors   -   Cameron McCormick
   Re: Custom Classes and Constructors   -   ss2 cire
   Re: Custom Classes and Constructors   -   Joe Strout

Custom Classes and Constructors
Date: 07.08.09 21:30 (Fri, 7 Aug 2009 13:30:58 -0700)
From: ss2 cire
Hi all,

A while back I started working on a project and hit a major road bump.
I have a custom class called

GameMap

it has a custom Constructor with the following code:

Sub Constructcor(InData As String, g As Graphics)
Dim rows(-1) As String
Dim roomInfo As String

Dim i As Integer
Dim s As String
rows = split(InData, EndOfLine.UNIX)

roomInfo = rows(0)

rows.Remove(0)

MsgBox roomInfo

For Each s in rows
Next
End Sub

And I have the following code in a method that is called when the app
opens:

Sub ParseMapFileData(FileContents As String, g As Graphics)
Dim startLoc, finishLoc, mapLoc, compassLoc As Point

Dim mapSize As Size

Dim mapCount As Integer = CountFields(FileContents, "-" +
EndOfLine.UNIX)

Dim mapData(-1) As String

mapData = Split(FileContents, "-" + EndOfLine.UNIX)

redim Maps(mapCount)

Dim i As Integer
Dim s As String
Dim gm as GameMap

For i = 0 to (mapCount - 1)
s = mapData(i)
gm = new GameMap(s, g)//I get the error "Parameters are not
compatible with this function, gm = new GameMap(s, g)"
Maps(i) = gm
Next
End Sub

Now if i change the error line to

gm = new GameMap()
gm.Constructor(s, g)

it works... Now my question is, "why" does that work? and WHY doesn't
it work the first way?
it seems counterintuative if i have to call Constructor as if it was a
normal function (I know internally it does that anyway...)

Thanks in advance,

Eric Hoaglin

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Custom Classes and Constructors
Date: 08.08.09 23:42 (Sat, 8 Aug 2009 16:42:18 -0600)
From: Norman Palardy

On 8-Aug-09, at 2:00 PM, RPEHLM wrote:

> >Deep fried twinkies are way better than plain old twinkies (really!)
> Is a Twinkie similar to a Mars bar? Used to get deep fried Mars
> bars in Prague (CZ) - yummie. Then a quick trot down to Kava Kava
> Kava for a bucket of coffee :)

No
A twinkie is a light cake filled with "creamy stuff" sort of like you
might find in an Oreo cookie - which are also pretty good deep fried :)

> RS should commision a paper entitled "How to make your programmers
> more productive". It would be a recipe book for deep frying
> Twinkies/Mars bars, making B12/coffee, how to jolt your own cola etc.

Mmmmmmmmm .. written by the Emeril Lagasse / Julia Child of the
programming world ?
I wonder if Carmack cooks ?

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Custom Classes and Constructors
Date: 08.08.09 19:02 (Sat, 8 Aug 2009 12:02:50 -0600)
From: Kirk Gray
On Aug 8, 2009, at 10:49 AM, Terry Ford wrote:

> On Aug 8, 2009, at 8:44 AM, Norman Palardy wrote:
>
>> On 8-Aug-09, at 9:14 AM, Kirk Gray wrote:
>>
>>> On Aug 8, 2009, at 9:02 AM, Norman Palardy wrote:
>>>
>>>> If it weren't for coffee and Cheezies (see http://www.cheezies.com/flash.htm
>>>> - way better than Cheezit's etc) I may have starved through
>>>> University :P
>>>
>>> Well of course. Cheezies are deep fried. Cheezits are baked.
>>> Deep fried beats baked ANY day. :o)
>>
>> Of course !
>> Deep fried twinkies are way better than plain old twinkies (really!)
>> And even a deep fried dill pickle is pretty darned good :P
>
> Boy. You guys must love Trans-Fats. I nibble on Cheddar Cheese
> Goldfish to satisfy my cravings. Baked; not fried. Much healthier
> for my old body.
>
> Besides, the cheese in Cheezies and Cheeseits taste like chemicals
> to me. The excessive salt masks this somewhat.
>
> I feel sorry for your arteries.

Terry,

I see you fail to fully appreciate the love and old-world
craftsmanship that are necessary to chemically break down "all
natural" food stuffs, separate, dehydrate, and prepare their
constituent parts. Store and transport them in huge quantities. Then
loving recombine them to create something new. Something wonderful.
Something never intended by Nature.

The only fitting way to prepare a feast of this kind is in a
commercial vat of boiling, glorious, partially hydrogenated mono- and
polyunsaturated fats.

Surely the gods have visited us with high cholesterol, hardening of
the arteries, coronary heart disease, and the rest out of spite and
jealousy -- because we have created something so utterly fantastically
tasty. And worse -- not shared it with them.

:o)

P.S. These are, of course, the same gods that get totally pissed when
list threads are highjacked.

—————————————
Kirk Gray
REALbasic Studio 2009r2.1
MacBook Core 2 Duo, OS X 10.5.6
Power Mac dual G4, OS X 10.4.11

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Custom Classes and Constructors
Date: 08.08.09 17:49 (Sat, 8 Aug 2009 09:49:36 -0700)
From: Terry Ford

On Aug 8, 2009, at 8:44 AM, Norman Palardy wrote:

>
> On 8-Aug-09, at 9:14 AM, Kirk Gray wrote:
>
>> On Aug 8, 2009, at 9:02 AM, Norman Palardy wrote:
>>
>>> If it weren't for coffee and Cheezies (see http://www.cheezies.com/flash.htm
>>> - way better than Cheezit's etc) I may have starved through
>>> University :P
>>
>> Well of course. Cheezies are deep fried. Cheezits are baked.
>> Deep fried beats baked ANY day. :o)
>
> Of course !
> Deep fried twinkies are way better than plain old twinkies (really!)
> And even a deep fried dill pickle is pretty darned good :P

Boy. You guys must love Trans-Fats. I nibble on Cheddar Cheese
Goldfish to satisfy my cravings. Baked; not fried. Much healthier for
my old body.

Besides, the cheese in Cheezies and Cheeseits taste like chemicals to
me. The excessive salt masks this somewhat.

I feel sorry for your arteries.

Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Custom Classes and Constructors
Date: 08.08.09 16:44 (Sat, 8 Aug 2009 09:44:59 -0600)
From: Norman Palardy

On 8-Aug-09, at 9:14 AM, Kirk Gray wrote:

> On Aug 8, 2009, at 9:02 AM, Norman Palardy wrote:
>
>> If it weren't for coffee and Cheezies (see http://www.cheezies.com/flash.htm
>> - way better than Cheezit's etc) I may have starved through
>> University :P
>
> Well of course. Cheezies are deep fried. Cheezits are baked. Deep
> fried beats baked ANY day. :o)

Of course !
Deep fried twinkies are way better than plain old twinkies (really!)
And even a deep fried dill pickle is pretty darned good :P

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Custom Classes and Constructors
Date: 08.08.09 21:00 (Sat, 08 Aug 2009 22:00:08 +0200)
From: RPEHLM
>Deep fried twinkies are way better than plain old twinkies (really!)
Is a Twinkie similar to a Mars bar? Used to get deep fried Mars bars in
Prague (CZ) - yummie. Then a quick trot down to Kava Kava Kava for a
bucket of coffee :)

RS should commision a paper entitled "How to make your programmers more
productive". It would be a recipe book for deep frying Twinkies/Mars
bars, making B12/coffee, how to jolt your own cola etc.

Robin

Norman Palardy wrote:
>
> On 8-Aug-09, at 9:14 AM, Kirk Gray wrote:
>
>> On Aug 8, 2009, at 9:02 AM, Norman Palardy wrote:
>>
>>> If it weren't for coffee and Cheezies (see
>>> http://www.cheezies.com/flash.htm - way better than Cheezit's etc) I
>>> may have starved through University :P
>>
>> Well of course. Cheezies are deep fried. Cheezits are baked. Deep
>> fried beats baked ANY day. :o)
>
> Of course !
> Deep fried twinkies are way better than plain old twinkies (really!)
> And even a deep fried dill pickle is pretty darned good :P
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Custom Classes and Constructors
Date: 08.08.09 16:14 (Sat, 8 Aug 2009 09:14:38 -0600)
From: Kirk Gray
On Aug 8, 2009, at 9:02 AM, Norman Palardy wrote:

> If it weren't for coffee and Cheezies (see http://www.cheezies.com/flash.htm
> - way better than Cheezit's etc) I may have starved through
> University :P

Well of course. Cheezies are deep fried. Cheezits are baked. Deep
fried beats baked ANY day. :o)

—————————————
Kirk Gray
REALbasic Studio 2009r2.1
MacBook Core 2 Duo, OS X 10.5.6
Power Mac dual G4, OS X 10.4.11

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Custom Classes and Constructors
Date: 08.08.09 16:02 (Sat, 8 Aug 2009 09:02:05 -0600)
From: Norman Palardy

On 8-Aug-09, at 2:14 AM, Dirk Cleenwerck wrote:

> And here I was thinking it was supposed to be Jolt Cola.
>
> Dirk Cleenwerck

Jolt came out long ago - but long after I was hooked on coffee and
smokes (at that point in my life)

If it weren't for coffee and Cheezies (see http://www.cheezies.com/flash.htm
- way better than Cheezit's etc) I may have starved through
University :P

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Custom Classes and Constructors
Date: 08.08.09 03:34 (Fri, 7 Aug 2009 20:34:46 -0600)
From: Norman Palardy

On 7-Aug-09, at 8:12 PM, Cameron McCormick wrote:

> Hehe, yeah these kind of things tend to sneak up on you, generally
> at 4am when hopped up on RedBull...

You kids and yer Red Bull :P
What ever happened to just dosing up on B12 and / or coffee (and in my
younger days smokes too) ?

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Custom Classes and Constructors
Date: 08.08.09 07:50 (Sat, 08 Aug 2009 08:50:28 +0200)
From: RPEHLM
Still doing that here :-D

Robin

Norman Palardy wrote:
>
> On 7-Aug-09, at 8:12 PM, Cameron McCormick wrote:
>
>> Hehe, yeah these kind of things tend to sneak up on you, generally at
>> 4am when hopped up on RedBull...
>
> You kids and yer Red Bull :P
> What ever happened to just dosing up on B12 and / or coffee (and in my
> younger days smokes too) ?
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Custom Classes and Constructors
Date: 08.08.09 09:14 (Sat, 08 Aug 2009 10:14:18 +0200)
From: Dirk Cleenwerck
And here I was thinking it was supposed to be Jolt Cola.

Dirk Cleenwerck

RPEHLM wrote:
> Still doing that here :-D
>
> Robin
>
> Norman Palardy wrote:
>>
>> On 7-Aug-09, at 8:12 PM, Cameron McCormick wrote:
>>
>>> Hehe, yeah these kind of things tend to sneak up on you, generally
>>> at 4am when hopped up on RedBull...
>>
>> You kids and yer Red Bull :P
>> What ever happened to just dosing up on B12 and / or coffee (and in
>> my younger days smokes too) ?
>>
>> _______________________________________________
>> Unsubscribe or switch delivery mode:
>> <http://www.realsoftware.com/support/listmanager/>
>>
>> Search the archives:
>> <http://support.realsoftware.com/listarchives/lists.html>
>>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Custom Classes and Constructors
Date: 08.08.09 03:12 (Fri, 7 Aug 2009 22:12:53 -0400)
From: Cameron McCormick
Hehe, yeah these kind of things tend to sneak up on you, generally at 4am
when hopped up on RedBull...

I'd rather be considered lucky than good.
-Cameron

On Fri, Aug 7, 2009 at 5:14 PM, ss2 cire <<email address removed>> wrote:

> hahaha,
>
> Thanks Joe :) I could have swore it was spelled correctly.. but thanks :)
>
> On Aug 7, 2009, at 1:50 PM, Joe Strout wrote:
>
> ss2 cire wrote:
>>
>> > Sub Constructcor(InData As String, g As Graphics)
>> > ...
>>
>>> gm = new GameMap()
>>> gm.Constructor(s, g)
>>> it works... Now my question is, "why" does that work? and WHY doesn't it
>>> work the first way?
>>>
>> Actually, I bet the second line only works if you match the misspelling of
>> Constructor that you used in your actual sub. And if you spell it correctly
>> there, then the first way will work.
>>
>> Best,
>> - Joe
>>
>> --
>> Joe Strout
>> Inspiring Applications, Inc.
>> http://www.InspiringApps.com
>>
>> _______________________________________________
>> Unsubscribe or switch delivery mode:
>> <http://www.realsoftware.com/support/listmanager/>
>>
>> Search the archives:
>> <http://support.realsoftware.com/listarchives/lists.html>
>>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Custom Classes and Constructors
Date: 07.08.09 22:14 (Fri, 7 Aug 2009 14:14:21 -0700)
From: ss2 cire
hahaha,

Thanks Joe :) I could have swore it was spelled correctly.. but
thanks :)

On Aug 7, 2009, at 1:50 PM, Joe Strout wrote:

> ss2 cire wrote:
>
> > Sub Constructcor(InData As String, g As Graphics)
> > ...
>> gm = new GameMap()
>> gm.Constructor(s, g)
>> it works... Now my question is, "why" does that work? and WHY
>> doesn't it work the first way?
>
> Actually, I bet the second line only works if you match the
> misspelling of Constructor that you used in your actual sub. And if
> you spell it correctly there, then the first way will work.
>
> Best,
> - Joe
>
> --
> Joe Strout
> Inspiring Applications, Inc.
> http://www.InspiringApps.com
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Custom Classes and Constructors
Date: 07.08.09 21:50 (Fri, 07 Aug 2009 14:50:05 -0600)
From: Joe Strout
ss2 cire wrote:

> Sub Constructcor(InData As String, g As Graphics)
> ...
> gm = new GameMap()
> gm.Constructor(s, g)
>
> it works... Now my question is, "why" does that work? and WHY doesn't it
> work the first way?

Actually, I bet the second line only works if you match the misspelling
of Constructor that you used in your actual sub. And if you spell it
correctly there, then the first way will work.

Best,
- Joe