1. Help again
- Posted by Adam Weeden <theskaman at MINDSPRING.COM> Apr 09, 1999
- 503 views
------=_NextPart_000_0044_01BE828D.9D669D20 boundary="----=_NextPart_001_0045_01BE828D.9D669D20" ------=_NextPart_001_0045_01BE828D.9D669D20 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Okay, I fixed the bug with the variables being uninitialized, and it = still crashes, any ideas? ------=_NextPart_001_0045_01BE828D.9D669D20 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"> <HTML> <HEAD> <META content=3Dtext/html;charset=3Diso-8859-1 = http-equiv=3DContent-Type> <META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT color=3D#000000 size=3D2>Okay, I fixed the bug with the = variables being=20 uninitialized, and it still crashes, any = ------=_NextPart_001_0045_01BE828D.9D669D20-- ------=_NextPart_000_0044_01BE828D.9D669D20 name="wiftest.ex"
2. Re: Help again
- Posted by Paul Martin <twilight at WCC.NET> Apr 09, 1999
- 589 views
Hello I ran your program and it appears that it fails the type check because if length(file[WIF_PalList]) != MaxPal then -- Make sure there are exactly return 0 -- pallete references allowed. end if -- refernces will be {0, 0, 0} It seems that the length of file[WIF_PalList] is 87 and not 85 which would be equal to MaxPal. I hope that helps Paul Martin At 01:33 PM 4/9/99 -0400, you wrote: > Okay, I fixed the bug with the variables being uninitialized, and it >still crashes, any ideas? Attachment Converted: >"c:\eudora\attach\wiftest1.ex" Attachment Converted: >"c:\eudora\attach\fileman.e" Attachment Converted: "c:\eudora\attach\WIF1.E"
3. Re: Help again
- Posted by Harry White <werwolf at CU-MUC.DE> Apr 09, 1999
- 521 views
At 08:41 PM 4/9/99 +0200, you wrote: >Hello > >I ran your program and it appears that it fails the type check because > > if length(file[WIF_PalList]) != MaxPal then -- Make sure there are exactly > return 0 -- pallete references allowed. > end if -- refernces will be {0, 0, 0} > >It seems that the length of file[WIF_PalList] is 87 and not 85 which would >be equal to MaxPal. > >I hope that helps > >Paul Martin > >At 01:33 PM 4/9/99 -0400, you wrote: >> Okay, I fixed the bug with the variables being uninitialized, and it >>still crashes, any ideas? Attachment Converted: >>"c:\eudora\attach\wiftest1.ex" Attachment Converted: >>"c:\eudora\attach\fileman.e" Attachment Converted: >"c:\eudora\attach\WIF1.E" well i still found the problem with that uninitialized variables look at what euphoria gave back as i tried to run it : D:\EUDORA\ATTACH\WIFTEST1.EX:5 Init has not been declared myimage = Init() Greetings Harry White <<---- Builder of the Euphoria 2.1 Frontend for Windows 95/98 ---->> Just ask for it :) ICQ # 23724435
4. Re: Help again
- Posted by "M. Schut" <m.schut at TWI.TUDELFT.NL> Apr 10, 1999
- 509 views
Thee were some errors in your type definitions and the creation of the blank WIF: 1. RGB_Trip -> Forgot to return 1 when it is a valid RGB-color 2. The creation of the BlankWIF: 2.1 You've used | temp = {0,0,0} | for count = 2 to MaxPal do | temp = append(temp, {0,0,0}) | end for This creates an sequence: {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,... } Where you would want to get { {0,0,0}, {0,0,0}, {0,0,0} ... } Solution modified temp into: temp = { {0,0,0} } or (easier) : temp = repeat({0,0,0}, MaxPal) -- And erase the for-loop 2.2 BlankWIF = append(append(append(BlankWIF, temp), 0), 0) Here you set the size of the image to 0x0 However in the type-check for a valid image you check whether it is at least 1x1. So you could change the type-check, or you can substitute the 0's by 1's. (BlankWIF = append(append(append(BlankWIF, temp), 1), 1) 2.3 temp2 = temp [See point 2.1] Change this to: temp2 = { temp } for count = 2 to MaxWidth -- Instead of MaxHeight . for count = 2 to MaxHeight -- Instead of MaxWidth Or easier substitute: | temp = {0} | for count = 2 to MaxHeight do | temp = append(temp, 0) | end for | temp2 = { temp } ----------- | for count2 = 2 to MaxWidth do | temp2 = append(temp2, temp) | end for with: | temp2 = repeat(repeat(0,MaxHeight),MaxWidth) You did originally create a image with horizontal scanlines, however when you checked the type of the image you checked vertical scanlines. With this modifications it still doesn't work -> File header exceeds 1K in prepfile()... But it should give you a direction. Just some questions: Why do you always create an image of 64x64? Even when your image is only 15x15 it creates internally an image of 64x64. So why don;t you use a 'constructor'. So you can do something like CreateWIFImage(x-size, y-size) to create the image. > Okay, I fixed the bug with the variables being uninitialized, and it still crashes, any ideas? Martin Schut P.S. <G> I love that trace-function :)
5. Re: Help again
- Posted by "theskaman at mindspring.com" <theskaman at MINDSPRING.COM> Apr 10, 1999
- 478 views
> ** Original Subject: Re: Help again > ** Original Sender: "M. Schut" <m.schut at TWI.TUDELFT.NL> > ** Original Date: Sat, 10 Apr 1999 11:19:26 +0200 > ** Original Message follows... > > There were some errors in your type definitions and the creation of the blank > WIF: > > 1. RGB_Trip -> Forgot to return 1 when it is a valid RGB-color > 2. The creation of the BlankWIF: > 2.1 You've used > | temp = {0,0,0} > | for count = 2 to MaxPal do > | temp = append(temp, {0,0,0}) > | end for > This creates an sequence: > {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,... } > Where you would want to get { {0,0,0}, {0,0,0}, {0,0,0} ... } > Solution modified temp into: temp = { {0,0,0} } > or (easier) : temp = repeat({0,0,0}, MaxPal) -- > And erase the for-loop > 2.2 BlankWIF = append(append(append(BlankWIF, temp), 0), 0) > Here you set the size of the image to 0x0 However in the > type-check for a valid image > you check whether it is at least 1x1. So you could change the > type-check, or you can > substitute the 0's by 1's. (BlankWIF = > append(append(append(BlankWIF, temp), 1), 1) > 2.3 temp2 = temp [See point 2.1] > Change this to: temp2 = { temp } > for count = 2 to MaxWidth -- Instead of > MaxHeight > . > for count = 2 to MaxHeight -- Instead of > MaxWidth > Or easier substitute: > | temp = {0} > | for count = 2 to MaxHeight do > | temp = append(temp, 0) > | end for > | temp2 = { temp } ----------- > | for count2 = 2 to MaxWidth do > | temp2 = append(temp2, temp) > | end for > with: > | temp2 = repeat(repeat(0,MaxHeight),MaxWidth) > You did originally create a image with horizontal scanlines, > however when you checked > the type of the image you checked vertical scanlines. > > With this modifications it still doesn't work -> File header exceeds 1K in > prepfile()... > But it should give you a direction. > > Just some questions: Why do you always create an image of 64x64? Even when > your image is only 15x15 it creates internally an image of 64x64. So why > don;t you use a 'constructor'. So you can do something like > CreateWIFImage(x-size, y-size) to create the image. > > > > Okay, I fixed the bug with the variables being uninitialized, and it still > crashes, any ideas? > > > Martin Schut > > P.S. <G> I love that trace-function :) >** --------- End Original Message ----------- ** Thanks for the help Martin, I will try to get everything working. The main reason I "force" it to make it a 64*64 image is that that was the only way to get it to work with FileMan, I know I probably should have made my own file i/o routines with bget, but thats my foresight. Now I'm probably going to use bget anyway, so I have wasted a bit of my time. Adam Weeden WeedenSoft Technologies