Re: [OpenSmalltalk/opensmalltalk-vm] Add WindowEventMetricChange support for macOS (iOS). Fix a nasty typo in iOS (0361fc3)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Add WindowEventMetricChange support for macOS (iOS). Fix a nasty typo in iOS (0361fc3)

David T Lewis
 

What is being switched here?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43194402", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43194402", "name": "View Commit" }, "description": "View this Commit on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Add WindowEventMetricChange support for macOS (iOS). Fix a nasty typo in iOS (0361fc3)

David T Lewis
 

A frivolous name WindowEventWindowStinks for a useful one WindowEventScreenChange


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43195040", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43195040", "name": "View Commit" }, "description": "View this Commit on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Add WindowEventMetricChange support for macOS (iOS). Fix a nasty typo in iOS (0361fc3)

David T Lewis
In reply to this post by David T Lewis
 

I love that sentence,but the swithc is missing a case, it only has a default, does it?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43195124", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43195124", "name": "View Commit" }, "description": "View this Commit on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Add WindowEventMetricChange support for macOS (iOS). Fix a nasty typo in iOS (0361fc3)

David T Lewis
In reply to this post by David T Lewis
 

I noticed the missing case, too. An experiment in VS 2019 shows that part after switch() is skipped (in C++). Does OjbC handle it differently?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43197994", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43197994", "name": "View Commit" }, "description": "View this Commit on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Add WindowEventMetricChange support for macOS (iOS). Fix a nasty typo in iOS (0361fc3)

David T Lewis
In reply to this post by David T Lewis
 

I think you're being misled by git diffs. here's the actual switch in the source

        NSRect frame = [window frame];
        NSRect screen = [[window screen] frame];
        evt.value1 = frame.origin.x;
        evt.value2 = screen.size.height - (frame.size.height + frame.origin.y);
        evt.value3 = frame.size.width;
        evt.value4 = frame.size.height;
        break;
    default:
        evt.value1 = 0;
        evt.value2 = 0;
        evt.value3 = 0;
        evt.value4 = 0;
    }```

That's quite regular, right?  It's wrong, because the image wants left/top/right/bottom, not left/top/width/height, but... :-)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43207067", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43207067", "name": "View Commit" }, "description": "View this Commit on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Add WindowEventMetricChange support for macOS (iOS). Fix a nasty typo in iOS (0361fc3)

David T Lewis
In reply to this post by David T Lewis
 

The case ... : is missing.

I would have expected:

    switch (windowType) {
    case SOMETHING:
        NSRect frame = [window frame];
        NSRect screen = [[window screen] frame];
        evt.value1 = frame.origin.x;
        evt.value2 = screen.size.height - (frame.size.height + frame.origin.y);
        evt.value3 = frame.size.width;
        evt.value4 = frame.size.height;
        break;
    default:
        evt.value1 = 0;
        evt.value2 = 0;
        evt.value3 = 0;
        evt.value4 = 0;
    }

but there is no case me puzzled


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43207555", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43207555", "name": "View Commit" }, "description": "View this Commit on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Add WindowEventMetricChange support for macOS (iOS). Fix a nasty typo in iOS (0361fc3)

David T Lewis
In reply to this post by David T Lewis
 

Clearly, some case of windowType is expected.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43207978", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43207978", "name": "View Commit" }, "description": "View this Commit on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Add WindowEventMetricChange support for macOS (iOS). Fix a nasty typo in iOS (0361fc3)

David T Lewis
In reply to this post by David T Lewis
 

Doh! Thanks both.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43209054", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0361fc33d5f72b153b098f6400bad9b664a2625f#commitcomment-43209054", "name": "View Commit" }, "description": "View this Commit on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>