Cuis-Smalltalk / Cuis-Smalltalk-Dev

Active development of Cuis Smalltalk
MIT License
433 stars 71 forks source link

Filing in packages results in misleading error messages #191

Closed ghost closed 3 years ago

ghost commented 3 years ago

The title describes the problem. This is a duplicate of https://todo.sr.ht/~cy-de-fect/HaverOnCuis/10 and resulted from this E-Mail report: https://todo.sr.ht/~cy-de-fect/HaverOnCuis/10

Hi Nicola,

I am doing something similar to transform a Cuis-image into a Haver-image, but I am using Feature:

https://hg.sr.ht/~cy-de-fect/HaverOnCuis/browse/haver/Haverize.pck.st?rev=tip#L27

I don't get any unwanted confirmation dialogs.

Are you referring to the message displayed in the attached screen-shot. The message is rather silly. Please use Feature>>#require: with a FileSystemEntry instance as an argument.

(Nevertheless we should fix that silly message)

Best Regards and HTH,

Gerald

On 7/30/21 12:18 PM, Nicola Mingotti via Cuis-dev wrote:

Hi guys,

A few questions for you ;)

1] If I install OSProcesses from the File browser no problem, but if I install it from the '.st' script, like below, I get an annoying message asking me to press ok. Why that? The message I send via GUI or script it the same AFAICanSay.

" -] OSProcesses " vmDir _ DirectoryEntry smalltalkImageDirectory . pathStr1 _ vmDir parent pathName, 'OSProcesses/OSProcesses.pck.st'. file1 _  FileSystemEntry withPathName: pathStr1. CodePackageFile installPackage: file1.

2] Why dos package OSProcesses does not have the standard name Cuis-Smalltalk-OSProcesses ?

3] Since I am automatizing the system via script I would prefer that when I select World -> Quit the system stop asking me if I want to save the image, by default I don't want. Is there a variable the say that ? Or do I need to make a change, file it out and file it in in the '.st' file ?

bye Nicola
nmingotti commented 3 years ago

This messages are annoying because they require confirmation. In a scenario where one wants to load packages at image boot via script, the script gets stuck awaiting user click. Attach picture of the message.

image

nmingotti commented 3 years ago

nono, all bad, we slipped on a banana. I mistook OSProcess with OSProcesses. Running either

Feature require: 'OSProcess'.

or

vmDir _ DirectoryEntry smalltalkImageDirectory .
pathStr1 _ vmDir parent pathName, '/OSProcess/OSProcess.pck.st'. 
file1 _  FileSystemEntry withPathName: pathStr1. 
CodePackageFile installPackage: file1. 

works flawlessly.

On the other side this rises another point. If the message was more informative we would not have fallen so badly ;)

IMO, this can be closed.

ghost commented 3 years ago

Yep, I agree. Thanks Juan!