1. EuGrid Issues

Anybody know why the line below would be failing?

if not EGW_AddColumn(newGrid,name,140,EGW_FIRST,EGW_STATIC,1) then ?1/0 end if
if not EGW_AddColumn(newGrid,"Cost",70,EGW_LAST,EGW_STATIC,2) then ?1/0 end if
if not EGW_AddColumn(newGrid,"Ref",70,EGW_LAST,EGW_STATIC,3) then ?1/0 end if
-- fails next line
if not EGW_SetColumnProperty(newGrid,3,EGW_COL_DATATYPE,EGW_NUMBER) then ?1/0
end if
if not EGW_SetColumnProperty(newGrid,3,EGW_COL_NUMFORMAT,"%d") then ?1/0 end if

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » topic index » view message » categorize

2. Re: EuGrid Issues

cklester wrote:
> 
> Anybody know why the line below would be failing?
> 
> if not EGW_AddColumn(newGrid,name,140,EGW_FIRST,EGW_STATIC,1) then ?1/0 end if
> if not EGW_AddColumn(newGrid,"Cost",70,EGW_LAST,EGW_STATIC,2) then ?1/0 end if
> if not EGW_AddColumn(newGrid,"Ref",70,EGW_LAST,EGW_STATIC,3) then ?1/0 end if
> -- fails next line
> if not EGW_SetColumnProperty(newGrid,3,EGW_COL_DATATYPE,EGW_NUMBER) then ?1/0
> end if
> if not EGW_SetColumnProperty(newGrid,3,EGW_COL_NUMFORMAT,"%d") then ?1/0 end
> if
> 
> -=ck
> "Programming in a state of EUPHORIA."
> <a
> href="http://www.cklester.com/euphoria/">http://www.cklester.com/euphoria/</a>
> 
Maybe try...

atom col1 = EGW_AddColumn(newGrid,name,140,EGW_FIRST,EGW_STATIC,1)
atom col2 = EGW_AddColumn(newGrid,"Cost",70,EGW_LAST,EGW_STATIC,2)
atom col3 = EGW_AddColumn(newGrid,"Ref",70,EGW_LAST,EGW_STATIC,3)
atom void = EGW_SetColumnProperty(newGrid,col3,EGW_COL_DATATYPE,EGW_NUMBER)
void EGW_SetColumnProperty(newGrid,col3,EGW_COL_NUMFORMAT,"%d")

I think the problem is when you assume that the third column is 
actually column id 3.  It makes sense logically but that's not how it works.

Jonas

Jonas Temple
http://www.yhti.net/~jktemple

new topic     » goto parent     » topic index » view message » categorize

3. Re: EuGrid Issues

Jonas Temple wrote:
> cklester wrote:
> > Anybody know why the line below would be failing?
> > 
> > if not EGW_AddColumn(newGrid,name,140,EGW_FIRST,EGW_STATIC,1) then ?1/0 end
> > if
> > if not EGW_AddColumn(newGrid,"Cost",70,EGW_LAST,EGW_STATIC,2) then ?1/0 end
> > if
> > if not EGW_AddColumn(newGrid,"Ref",70,EGW_LAST,EGW_STATIC,3) then ?1/0 end
> > if
> > -- fails next line
> > if not EGW_SetColumnProperty(newGrid,3,EGW_COL_DATATYPE,EGW_NUMBER) then
> > ?1/0 end if
> > if not EGW_SetColumnProperty(newGrid,3,EGW_COL_NUMFORMAT,"%d") then ?1/0 end
> > if
> > 
> Maybe try...
> 
> atom col1 = EGW_AddColumn(newGrid,name,140,EGW_FIRST,EGW_STATIC,1)
> atom col2 = EGW_AddColumn(newGrid,"Cost",70,EGW_LAST,EGW_STATIC,2)
> atom col3 = EGW_AddColumn(newGrid,"Ref",70,EGW_LAST,EGW_STATIC,3)
> atom void = EGW_SetColumnProperty(newGrid,col3,EGW_COL_DATATYPE,EGW_NUMBER)
> void EGW_SetColumnProperty(newGrid,col3,EGW_COL_NUMFORMAT,"%d")
> 
> I think the problem is when you assume that the third column is 
> actually column id 3.  It makes sense logically but that's not how it works.

Jonas, thanks! You are correct. I thought it wanted the column NUMBER, not
a column ID. Oops. :)

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view message » categorize

4. Re: EuGrid Issues

Hi All,

Looks like all that effort on the manual went for naught blink

Thanks to Jonas for fielding this one.  I'm starting to think that he
understands it better than me.  Scary...

Phil

new topic     » goto parent     » topic index » view message » categorize

5. Re: EuGrid Issues

Phil Russell wrote:
> 
> Looks like all that effort on the manual went for naught blink

HAHA! I know how you feel, but it ain't true! I just misread it. My bad! :)

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu