[Cuis-dev] File Out Modification

Juan Vuletich juan at cuis.st
Fri Nov 29 06:47:57 PST 2024


Hi Juan Cruz,

These are some notes I took while reviewing your code:
- Having both #fileOutsDirectory and #fileOutsPathDirectory is asking 
for trouble
- Having both #fileOutsPathDirectory and #userPathDirectory meaning the 
same is extra complexity
- In userPathDirectory, the line
     UserBaseDirectory notNil ifTrue: [ ^ UserPathDirectory ] looks 
wrong anyway.
- Using a Preference means not needing to add a class var, and making it 
easy to persist
- And code may be refactored to make it more general and compact.

The result is in updates #6873, #6874 and #6875 now at GitHub. You can 
get them and compare with yours. I factored away the handling of 
querying the user for custom path and file at once, and persisting the 
file. The 15 senders are now simpler, not more complex. And it is 
trivial to do the same for Logs, UserChanges, NewPackages and Changesets.

I hope you find this exercise useful, especially wrt thinking about the 
broader possibilities and consequences of solving a specific itch.

Cheers,

On 11/27/2024 2:45 PM, Juan Vuletich via Cuis-dev wrote:
> On 11/27/2024 7:45 AM, Juan Cruz Montero via Cuis-dev wrote:
>> Hello everyone, Hello Juan V.
>>
>> My name is Juan Cruz Montero, and I’m a student at the University of 
>> Buenos Aires (UBA) in Argentina. While studying for my classes, I 
>> realized it would be very useful if the |FileOut| functionality 
>> allowed saving files to a custom folder instead of always defaulting 
>> to the |Cuis7-0-main-UserFiles| directory.
>>
>> With help from some members of the Cuis community, I implemented a 
>> feature that prompts the user to enter a directory path. It then 
>> verifies if the path exists. If it doesn’t, a pop-up menu appears 
>> with a message indicating that the path is invalid. Once the path is 
>> confirmed, the method proceeds to file out the content to the 
>> selected location.
>>
>> I found this feature especially helpful for tracking my projects 
>> using GitHub, as it allows me to file out directly to my repository 
>> folder.
>>
>> I hope you find this improvement useful! I’d love to hear your 
>> thoughts or suggestions.
>>
>> Thank you!
>>
>>
>>
>> -- 
>> _atentamente:_ /Juan Cruz Montero /
>
> Hi Juan Cruz,
>
> This is a very good idea. I'm reviewing your code, and will have 
> feedback tomorrow, I guess.
>
> Thanks!
> -- 
> Juan Vuletich
> cuis.st
> github.com/jvuletich
> researchgate.net/profile/Juan-Vuletich
> independent.academia.edu/JuanVuletich
> patents.justia.com/inventor/juan-manuel-vuletich
> linkedin.com/in/juan-vuletich-75611b3
> twitter.com/JuanVuletich


-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241129/19f7c3d7/attachment.htm>


More information about the Cuis-dev mailing list