Re: [MBS] Trying to use UNNotificationMBS

2020-10-02 Thread Jerry Fritschle
> On Oct 2, 2020, at 6:52 PM, Jerry Fritschle  wrote:
> 
> So now I can use the debugger to watch my example project work fine, 
> everywhere except Big Sur. 

Replying to myself here.  Bear with me for thinking aloud but I’m still hoping 
someone has an idea. :-)

Using UNNotification in a “real” project, rather than the example I made.  
Based on some reading, I had the thought to move the running app to the 
background while a lengthy operation was in progress.  Sure enough, the banner 
“completion" notification displayed properly.

With the app in the foreground, I still have to use the aforementioned 
workaround to changing the notification type (in System Preferences) to 
“alerts.”

So I’m on the right track.  But since I am only seeing this on BS, I don’t know 
whether it’s really my bug.  If it’s a BS bug, I can stop pulling my hair out. 
:-)
-
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com





___
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Trying to use UNNotificationMBS

2020-10-02 Thread Jerry Fritschle


> On Oct 1, 2020, at 8:22 PM, Jerry Fritschle  wrote:
> 
> UNUserNotificationCenter notifications are only approved from a built and 
> signed (!) app.  If there’s a way to code sign for debugging in Xojo, I sure 
> don’t know it.

Thank you to a nice lady (rhymes with Beatrix) who replied privately and set me 
straight here.  Having AppWrapper made it even better.  RTFM. :-)

So now I can use the debugger to watch my example project work fine, everywhere 
except Big Sur.  Again, the issue is that the notifications are being delivered 
but not displayed other than in the history—in short, the same thing my 
projects were doing with NSNotificationCenter, which started all this  :-P

-
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com



___
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Trying to use UNNotificationMBS

2020-10-01 Thread Jerry Fritschle
> On Oct 1, 2020, at 1:25 AM, Christian Schmitz  <mailto:supp...@monkeybreadsoftware.de>> wrote:
> 
> I am sorry. Will fix the plugin loading for 20.5pr1 later today.


Thanks.  That made a world of difference :-)

Working further on the example project, I went in circles for awhile until I 
finally figured out that, unlike NSUserNotification,  UNUserNotificationCenter 
notifications are only approved from a built and signed (!) app.  If there’s a 
way to code sign for debugging in Xojo, I sure don’t know it.

The example app works just fine on Catalina and Mojave.  As such I’ve already 
put this into the code of a couple of my main projects, using 
SystemInformationMBS.IsMojave to determine which API to use.  And they work 
just fine (including on a High Sierra VM, just to check.)

Fine, that is, until we get to Big Sur.  In this case, the banners do not 
display.  However, I get success from the event handler, and this is confirmed 
by looking at the notification history in the Finder (on BS, by tapping on the 
clock menu item.)

The workaround I found was to go to System Preferences>Notifications and change 
the type from “Banner” to “Alert”.  Then the notifications would display—but, 
of course, now had to be manually dismissed.

The funny thing is that I then tried the same workaround with my older stuff 
that used NSUserNotification, with the same result.   The irony is that I’ve 
changed APIs but gone full circle.  Of course, the migration is ultimately good.

My example project, including the signed build, is at :

https://www.seafortyone.com/beta/UNNotification.zip 
<https://www.seafortyone.com/beta/UNNotification.zip>

Anyone is welcome to look at this, and I hope it is found to be useful.  If I’m 
missing something, I’ll appreciate help.  But I’m wondering if I’m up against a 
Big Sur bug.

Thanks for reading.

-
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com



___
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Trying to use UNNotificationMBS

2020-09-30 Thread Jerry Fritschle
NSUserNotification was deprecated in Mojave, and I am finding it sketchy in Big 
Sur.  I’m therefore experimenting with moving to UNNotificationMBS.

In the sample project in progress, I have this code in a button’s Action event 
(myNotification and myNotificationCenter are declared in Window.Open)



myNotification=new UNMutableNotificationContentMBS()
myNotification.title=TextField1.Value
myNotification.body=TextField2.Value

Var myRequest as new UNNotificationRequestMBS(app.ExecutableFile.Name, 
myNotification,nil)
myNotificationCenter.addNotificationRequest(myRequest,nil)
https://www.seafortyone.com/beta/NSNotification.zip 
<https://www.seafortyone.com/beta/NSNotification.zip>

At this point I don’t know whether I have something missing, or I’ve run into 
someone else’s bug.

Thanks for reading.
-
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com



___
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] JPEG String to Picture broken on Linux.

2020-03-10 Thread Jerry Fritschle


> On Mar 10, 2020, at 3:50 PM, Christian Schmitz 
>  wrote:
> 
> I am sorry.


No apology necessary; I’m actually pleased with myself for figuring it out :-)
-
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com



___
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] JPEG String to Picture broken on Linux.

2020-03-10 Thread Jerry Fritschle
Hello,

Just installed 20.1.  In building cross-platform updates to my project, all was 
well on Mac and Windows, but on Linux it silently crashed, throwing no 
exceptions or such.  I played with setting breakpoints till I found it was 
failing when calling JPEGStringtoPictureMBS.

This was reproducible by running the StringToJPEG example.  Again, a silent 
crash.

I reverted to 20.0; the project (and the example) worked as expected.

This was on a Mint Cinnamon 19 VM in Fusion.

Thanks.

Jerry


-
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com




___
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Issue with CURLSMBS

2019-01-25 Thread Jerry Fritschle


> On Jan 25, 2019, at 5:44 AM, Jean-Luc Arnaud  wrote:
> 
> Here is my code, in the Run event of a Thread:
> 
> Dim CURL As New DownloadCURL ' (As CURLSMBS)
> 
> CURL.OptionURL="ftp://"+FTP_UserName+":"+FTP_Password+FTP_URL


I think you would need “@“ after the password.  For my part, I just put the 
login stuff in CURL.OptionUserName and .OptionPassword.

HTH


-
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com



___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] FTP directory listings a year late

2018-12-22 Thread Jerry Fritschle



> On Dec 22, 2018, at 3:30 AM, Christian Schmitz 
>  wrote:
> 
> Off by one is still wrong.
> I think I found a bug with < vs. >, so this should be fixed.
> 
> I'll send you a new plugin soon for testing.

Thanks for the prompt response.  With the new plugin, the example project works 
as expected.

I wish you and your family the best for the holidays.

-
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com



___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] FTP directory listings a year late

2018-12-21 Thread Jerry Fritschle
Hello,

I am running the CURL “FTP directory listing with wildcard” example, with both 
the current plugins and the current Xojo.  At present, the date property in the 
directory listings consistently show a year of 2017, when they should be 2018.  
I am seeing this on both my own FTP server, in the midwest US, and that of a 
client in California.

Using a commercial FTP client (Yummy FTP Pro), the listings appear as they 
should.

I am mystified by this.
-
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com



___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Resuming uploads with SFTP

2017-11-20 Thread Jerry Fritschle


> On Nov 19, 2017, at 5:24 PM, Christian Schmitz 
> <supp...@monkeybreadsoftware.de> wrote:
> 
> Well, I think you could move to CURLSFileInfoMBS class for FTP listing 
> instead.
> It does parsing better than FTPParse class.

Thank you.  I tried your example.  It works great with FTP.  Ironically, that 
is where I don’t need it for the purposes of this project.  Again, my aim is 
just to get the remote size in advance,  so I can tell SFTP to skip, and not 
try to append, any completed file.

For SFTP, curl returns Error 18 (closed with file length remaining).  If I take 
out the wildcard stuff, I get error 0 but blank FileInfo—same with FTP.

Now, I have no problem getting the string from OutputData.  So after splitting 
it into an array at the endOfLines (called “Stuff” here, with f as the local 
file), I can do this:
 
Dim x, u as integer
Dim canUpload as Boolean
u=ubound(Stuff)

For x=0 to u

If instr(Stuff(x),f.name)>0 then 
//exists on server
dim s as string=str(f.length)
if instr(Stuff(x),s)=0 then
//needs appending
canUpload=true
else
//it finished
 canUpload=False
end if
exit
else
//haven’t started it yet
canUpload=true
end if

Next

If canUpload=true then
//perform
else
//skip and go to next file in batch
End if

Now, this actually works in my tests, but I also feel that it would get me a 
special exhibit at the World Museum of Kludges, and I’m not that desperate to 
be famous. :-)  The other approach is to keep my own log in ApplicationData, 
and work from that when trying to resume.
-
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com



___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Resuming uploads with SFTP

2017-11-19 Thread Jerry Fritschle
I am still at this point:  that if I try to rerun an interrupted batch upload 
with SFTP, it will corrupt any file that is already complete, when it tries to 
append.  So I have thought of a couple of workarounds.

One of these was to get a directory listing in advance, parse the sizes, and 
skip over anything that appears complete (at least in the SFTP branching code, 
since, again, FTP does not need this.)  For this I was going to use 
FTPparseMBS, which I’ve used in the past.  It has been a few years, as most of 
my need for it went away when I transitioned my FTP operations to libcurl.  
However, it appears to be gone now.

FTParseMBS still appears in the online documentation.  However, it is also said 
to derive from the Network plugin, and if I look there it is not listed.  So is 
this just a case of the documentation needing to be updated?  If so, I have 
another way to do this.



> On Nov 17, 2017, at 11:23 AM, Jerry Fritschle <jerryfritsc...@mac.com> wrote:
> 
> What fails is that, unlike FTP, if the file is already complete on the 
> server, it gets corrupted in the manner described (i.e, becomes an empty 
> file.)

-
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com



___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] Resuming uploads with SFTP

2017-11-17 Thread Jerry Fritschle
Okay, in the light of day and being a little fresher, I see what is going on.

Under SFTP, the resumption DOES work correctly, and the large test file, 
intentionally broken, is completed.

What fails is that, unlike FTP, if the file is already complete on the server, 
it gets corrupted in the manner described (i.e, becomes an empty file.)

With a batch (i.e, folder) upload, I don’t expect the end user to know exactly 
where the break occurred. With FTP we can restart the batch, and it simply 
passes over each completed file till it finds the point left off.

Gives me some ideas, and also gives me some incentive to put in a window to 
read debug data (this particular project is actually pretty new.)  Should have 
done that in the first place :-)

On Nov 17, 2017, at 1:54 AM, Christian Schmitz <supp...@monkeybreadsoftware.de> 
wrote:
> 
> As far as I see in library code, seeking for resume is implemented.
> Of course server needs to respond to file size query. If that fails, it 
> starts a new upload.

-
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com



___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] Resuming uploads with SFTP

2017-11-16 Thread Jerry Fritschle
I am working on adding SFTP compatibility to my products that, through 
CURLSMBS, employ FTP.  I am testing against an up-to-date CrushFTP server that 
I administer myself, which is accessible from the internet.

For my needs, I have worked everything out except for successfully being able 
to resume broken uploads.  Under regular FTP all is well, but trying it with 
SFTP results in the remote files being corrupted, with a byte count of 0.  The 
ability to resume is important, because my apps are primarily for moving large 
image files.  I’m interested in the security angle for files that may contain 
personal information.

From what I’m gathering about SFTP,  I am wondering whether this is even 
possible with libcurl. It is my understanding that its SFTP command vocabulary 
is relatively basic and limited.  Using built-in SFTP in the terminal, I am 
successful with the “reput” command.  So calling that from a shell, on Mac at 
least, is a possibility.

I appreciate hearing from anyone with experience in this.  I can also create an 
account on my server for anyone who wants to play. But I mainly just want to 
know whether it can be done via the CURL plugin before I spend any more time on 
it.

Thanks.

Jerry

-
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com



___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] JPEGStringtoPictureMBS broken on Linux?

2017-10-20 Thread Jerry Fritschle
In the Mac IDE, this worked perfectly as expected.

On both my Linux virtual machines (Ubuntu 64 bit and Xubuntu 32-bit), I got an 
empty window with “0” in the title bar.

It turned out that I had incorrectly assumed that GTK+3 was present in the 
Linux machines, so I installed.  This turned out not to be enough.  After I 
installed libgtk-3-dev, both your example and my project ran properly.

> On Oct 18, 2017, at 5:14 PM, Christian Schmitz 
> <supp...@monkeybreadsoftware.de> wrote:
> 
>> On Xojo 2017 1.1 and 17.3 plugins, this works on all platforms, where s was 
>> saved as a jpeg string.
> 
> This works here:
> 
> dim p as Picture = LogoMBS(500)
> dim s as string = PictureToJPEGStringMBS(p)
> 
> Title = str(lenb(s))
> Backdrop = JPEGStringToPictureMBS(s)
> 
> So if it fails, let me know how.
> 
> Sincerely
> Christian

-----
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com



___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


[MBS] JPEGStringtoPictureMBS broken on Linux?

2017-10-18 Thread Jerry Fritschle
On Xojo 2017 1.1 and 17.3 plugins, this works on all platforms, where s was 
saved as a jpeg string.

thePicture=JPEGStringtoPictureMBS(s, true)

On Xojo 2017 2.1 and 17.4 plugins, the code fails with a nilObjectException 
(thePicture is nil), but only on Linux (Ubuntu 16.04 in VirtualBox.). Mac and 
Win work as expected.  I have run 32 bit through the remote debugger, and also 
64 bit built apps.

I suppose I could isolate further by trying the old plugins in the newer Xojo, 
but I’ll see whether this is a known issue before I get into that :-)

Thanks.

Jerry

-
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com



___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Re: [MBS] FTP Upload Errors

2017-06-18 Thread Jerry Fritschle

> On Jun 13, 2017, at 9:20 AM, Christian Schmitz 
> <supp...@monkeybreadsoftware.de <mailto:supp...@monkeybreadsoftware.de>> 
> wrote:
> 
> Well, you have a precise error code.
> And a few on the error list shows 9 = REMOTE_ACCESS_DENIED.

Floyd, I often go to this page to run down libcurl error codes (that I haven’t 
memorized yet.)

https://curl.haxx.se/libcurl/c/libcurl-errors.html 
<https://curl.haxx.se/libcurl/c/libcurl-errors.html>

Hope you find this useful.

Jerry

-
"Drama is life with the dull bits cut out."
-Alfred Hitchcock

Jerry Fritschle
jerryfritsc...@icloud.com



___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info


Fwd: [MBS] Dropping PPC, OS X 10.4 and/or rbx plugins?

2016-01-02 Thread Jerry Fritschle

>> On Dec 30, 2015, at 11:03 AM, James Sentman <ja...@sentman.com 
>> <mailto:ja...@sentman.com>> wrote:
>> 
>> Closing off the support for that in the current version would be no problem 
>> for me as I would just save off the last build of the plugins that would 
>> work with those ancient versions of real basic that I still have installed 
>> on my machine here.
> 
> For some clients I too copy my main project into 2011r3, tweak a few lines of 
> code (all that absolutepath stuff, for instance) and build for UB.  
> 
> For a long time I just kept the then-current MBS plugins in there and was 
> fine.  However, just days ago I was very happy that I could put the .rbx 
> version of 15.4 in there, and save considerable work.  This was mostly 
> because of the updates to libcurl since then.
> 
> That is not something I will need in the long term.   Like James I’m sure I 
> can stand pat with the .rbx plugins I have (as, until now, I had been) 
> whenever I fire up 2011r3.  My point is that your question, combined with the 
> coincidence of my recent needs, just prompts me to thank you for keeping PPC 
> support for as long as you have :-)
> 
> -
> "Drama is life with the dull bits cut out."
> -Alfred Hitchcock
> 
> Jerry Fritschle
> jerryfritsc...@icloud.com <mailto:jerryfritsc...@icloud.com>
> 
> 
> 

___
Mbsplugins_monkeybreadsoftware.info mailing list
mbsplugins@monkeybreadsoftware.info
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info