Bug on [save] (program editor)

Messages in english

Modérateur : xcasadmin

compsystems
Messages : 558
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Bug on [save] (program editor)

Message par compsystems » lun. août 06, 2018 6:53 pm

Hi BP, I am currently stored functions from the xcas editor program

steps to reproduce the error

A: I start a new session
then I press file/save by default put the name session.xws, I write worksheet1.wsx on the path

C:\xcas\functions\worksheet1.wsx // ok

B: I write a function: Prg/New program

Code : Tout sélectionner

f1(x): = {
   local k;
   return x * x;
} :;
then press [OK] // ok

f1(y) returns y^2 // ok

C: then to press [save] (program editor) by default xcas put the name session0.cxx, then I locate where to store it

C1: then press Prog menu/ save as for example

C:\xcas\functions\f1.cxx

appears next to the [save] button, the path of the file name C:\xcas\functions\f1.cxx // ok

D: with a program editor as notepad open f1.cxx // ok

E: then I edit the program with the xcas program editor

f1 (x): = {
   local k;
   return x * x * x;
} :;

f1(y) returns y^3 // ok

and press again [save] (program editor)

I go to the notepad editor and sometimes the change is reflected, sometimes not.
other times when you press the save button, a pop-up window appears with a different name than the one previously stored (f1.cxx), to show the name of (session0.cxx).

F: Now if I close the session and open again, in the field next to the SAVE button, the file path does not appear, as a suggestion,
the path where the function was saved should be stored in the internal file (worksheet1.wsx),
also try to automatically put the name of the file in place of sessionx.cxx, of course this is only when a single function is defined, within the program editor.

Also, please press the [save] button to generate a popup window that shows the storage path, in order to know if the file was really modified
Dernière modification par compsystems le sam. sept. 08, 2018 3:39 am, modifié 1 fois.

parisse
Messages : 5734
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Bug on [save] (program editor)

Message par parisse » lun. août 06, 2018 8:37 pm

Please report something clearer, it's too long and it's not clear what might fail or what you might misuse.
If you press the Save button below the main menu, it will save the worksheet, but does not save anything in a cxx file. If you have a program that you want to reuse in another session, then either do copy/paste, or save it as a cxx file and import it in another session.

compsystems
Messages : 558
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Re: Bug on [save] (program editor)

Message par compsystems » sam. sept. 08, 2018 6:16 am

in summary when re-compiling [ok] and then [save] the file is no updated and sometimes corrupt files are generated in the current folder

video
https://youtu.be/7uP-zJqrB7c

compsystems
Messages : 558
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Re: Bug on [save] (program editor)

Message par compsystems » mar. sept. 11, 2018 3:07 am

In the hp-prime it happens sometimes, when a CAS file is renamed

parisse
Messages : 5734
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Bug on [save] (program editor)

Message par parisse » mar. sept. 11, 2018 12:27 pm

I don't think it is a bug: you should probably not modify a file that is already opened in your editor. You can do that with emacs on linux, but probably not on windows/other editors.
I don't know for the HP UI.

compsystems
Messages : 558
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Re: Bug on [save] (program editor)

Message par compsystems » mar. sept. 11, 2018 4:28 pm

the problem persists working even without external editors.

it seems that the pointer of the (session0.cxx) file name is lost, after recompiling, and there it stores corrupt copies of files

parisse
Messages : 5734
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Bug on [save] (program editor)

Message par parisse » mar. sept. 11, 2018 6:38 pm

Indeed, I'm adding a static declaration to avoid overwrite of the temporary C string.

Répondre