Writing to memo:

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Writing to memo:

Jon Kleiser
Can anybody tell me how to write text to a memo?
I've tried f=openfile("memo:mymemo", "w") and then write(f, mytext), as described in the Plua
docs, but it doesn't seem to work. If that mymemo doesn't already exist, I get f==nil. If it
does exist, nothing happens to its contents.

/Jon






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply | Threaded
Open this post in threaded view
|

Using external libraries (creating a palm doc with CDB Library)

manu_ma
I tried to create a palm doc, using the external library written by Matthew
M. Burke (CDB - createdb2).
Using the old sintax doesn't work any more:

         libNo = os.loadlib("CDBLib")
         db.createdoc()
         myDoc = db.open("SomeDocFile")
         db.write(myDoc, "string")

The new version of Plua 2 has indeed removed 'os.loadlib()' and
'os.removelib()'.

I tried to use:
         libNo = loadlib("CDBLib", "init")
         libNo()
         db.createdoc()
         myDoc = db.open("SomeDocFile")
         db.write(myDoc, "string")

but it doesn't work. I tried to change "init" with different string (like
PluaLibInit) but libNo is always nil and I get an error with libNo().
I checked that the file CDBLib is regularly loaded in my Palm (it's a file
with type = libr).

What is the right sintax for loadlib() ?

Mario


[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply | Threaded
Open this post in threaded view
|

Re: Writing to memo:

Jon Kleiser
In reply to this post by Jon Kleiser
--- In [hidden email], "Jon Kleiser" <jon.kleiser@...> wrote:
>
> Can anybody tell me how to write text to a memo?
> I've tried f=openfile("memo:mymemo", "w") and then write(f, mytext), as described in the
Plua
> docs, but it doesn't seem to work. If that mymemo doesn't already exist, I get f==nil. If it
> does exist, nothing happens to its contents.
>
> /Jon

If anybody has done this successfully, I'd apreciate a few words on how to do it.
I'm using Plua 1.1 on a Tungsten E.

/Jon






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply | Threaded
Open this post in threaded view
|

Re: Writing to memo:

burkemat
--- In [hidden email], "Jon Kleiser" <jon.kleiser@...> wrote:
>
> --- In [hidden email], "Jon Kleiser" <jon.kleiser@> wrote:
> >
> > Can anybody tell me how to write text to a memo?
> > I've tried f=openfile("memo:mymemo", "w") and then write(f,
mytext), as described in the


Take a look at posting 2806 in this group.  It's written for Plua 2
but should be easy enough to translate back into Plua 1.

Matt






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply | Threaded
Open this post in threaded view
|

Re: Writing to memo:

Jon Kleiser
>  > --- In [hidden email], "Jon Kleiser" <jon.kleiser@> wrote:
>>  >
>>  > Can anybody tell me how to write text to a memo?
>  > > I've tried f=openfile("memo:mymemo", "w") and then write(f,
>mytext), as described in the
>
>
>Take a look at posting 2806 in this group.  It's written for Plua 2
>but should be easy enough to translate back into Plua 1.
>
>Matt

Thanks for your response!
I did a few more tests, sticking to my openfile way, and found that
it sort of works. If the existing memo is big enough, then the new
data will be written into it. If the new data is less than the size
of the old memo, then some old data will be left at the end of the
memo. If a memo by the specified name does not already exist, I may
have to create it using f=opendb("MemoDB", "w") ...

/Jon


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply | Threaded
Open this post in threaded view
|

Re: Using external libraries (creating a palm doc with CDB Library)

Gustavo Magalhães
In reply to this post by manu_ma
I'm with a problem.
   
  Using Plua2 on PalmSim or POSE.
   
  Always happen the same error: "Emul68KCommon.c, Line:2027, Invalid ptr: 4E560000" (on PalmSim or POSE the is an error of memory access).
   
  sintax: loadlib("CDBLib",CDBLib")

  If anyone cold send an example program, Thanks.
 
[hidden email] escreveu:
  I tried to create a palm doc, using the external library written by Matthew
M. Burke (CDB - createdb2).
Using the old sintax doesn't work any more:

         libNo = os.loadlib("CDBLib")
         db.createdoc()
         myDoc = db.open("SomeDocFile")
         db.write(myDoc, "string")

The new version of Plua 2 has indeed removed 'os.loadlib()' and
'os.removelib()'.

I tried to use:
         libNo = loadlib("CDBLib", "init")
         libNo()
         db.createdoc()
         myDoc = db.open("SomeDocFile")
         db.write(myDoc, "string")

but it doesn't work. I tried to change "init" with different string (like
PluaLibInit) but libNo is always nil and I get an error with libNo().
I checked that the file CDBLib is regularly loaded in my Palm (it's a file
with type = libr).

What is the right sintax for loadlib() ?

Mario


[Non-text portions of this message have been removed]



  SPONSORED LINKS
        Programming languages   Palm computing   Computer security     C programming language   Computer programming languages   Computer training
   
---------------------------------
  YAHOO! GROUPS LINKS

   
    Visit your group "plua" on the web.
   
    To unsubscribe from this group, send an email to:
 [hidden email]
   
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

   
---------------------------------
 



 
---------------------------------
 Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora!

[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~-->
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply | Threaded
Open this post in threaded view
|

Re: Using external libraries (creating a palm doc with CDB Library)

migueletto
Hi,
   
>   Using Plua2 on PalmSim or POSE.
>    
>   Always happen the same error: "Emul68KCommon.c, Line:2027, Invalid
ptr: 4E560000" (on PalmSim or POSE the is an error of memory access).
>    
>   sintax: loadlib("CDBLib",CDBLib")
>
>   If anyone cold send an example program, Thanks.

Probably the library was compiled with a different Plua version.
Versions must match for this to work.

Regards,
Marcio.






------------------------ Yahoo! Groups Sponsor --------------------~-->
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply | Threaded
Open this post in threaded view
|

Re: Re: Using external libraries (creating a palm doc with CDB Library)

Gustavo Magalhães
Márcio,
   
  Thanks for your atencion.
   
  How you said, I loaded on PALMSIM:
   
  - CDBLib v.1.0
  - Plua v.1.0
   
  The Program (file memo):
   
  -- testecdb.lua
  libNo = loadlib("CDBLib","CDBLib")
  assert(libNo,"Error on loading")
  print("Done!")
  psleep(2)
   
  (like the readme tha comes with the CDB)
   
  Problem: the program always get out by the ASSERT.
   
  What I am doing of wrong.
   
  Thanks.
 

migueletto <[hidden email]> escreveu:
          Hi,

> Using Plua2 on PalmSim or POSE.
>
> Always happen the same error: "Emul68KCommon.c, Line:2027, Invalid
ptr: 4E560000" (on PalmSim or POSE the is an error of memory access).
>
> sintax: loadlib("CDBLib",CDBLib")
>
> If anyone cold send an example program, Thanks.

Probably the library was compiled with a different Plua version.
Versions must match for this to work.

Regards,
Marcio.



         

 
---------------------------------
 Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora!

[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~-->
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply | Threaded
Open this post in threaded view
|

Re: Using external libraries (creating a palm doc with CDB Library)

migueletto
Hi,
 

>   How you said, I loaded on PALMSIM:
>    
>   - CDBLib v.1.0
>   - Plua v.1.0
>    
>   The Program (file memo):
>    
>   -- testecdb.lua
>   libNo = loadlib("CDBLib","CDBLib")
>   assert(libNo,"Error on loading")
>   print("Done!")
>   psleep(2)
>    
>   (like the readme tha comes with the CDB)
>    
>   Problem: the program always get out by the ASSERT.
>    
>   What I am doing of wrong.

Perhaps you should contact the CDBLib author to understand what Plua
version he used to build the library. The "v.1.0" of CDBLib means
nothing to Plua. What matters is the libkit version used to compile it.

Regards,
Marcio.






------------------------ Yahoo! Groups Sponsor --------------------~-->
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/