Skip to content

Commit d461777

Browse files
committed
- Added README and license
- Updated SYS(1271) topic with bug issue
1 parent f6e4c67 commit d461777

File tree

3 files changed

+90
-65
lines changed

3 files changed

+90
-65
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Hacker's Guide to Visual FoxPro
2+
3+
See the GitHub pages site ([https://hackfox.github.io/](https://hackfox.github.io/)) if you want to read the content.
4+
5+
If you wish to contribute to Hacker's Guide, the source repository ([https://github.com/HackFox/Source](https://github.com/HackFox/Source)) has two tables you'll find useful:
6+
7+
* Contents.dbf: contains the names of the files representing all documents except those in the reference section (section 4). Documents are in folders by section. For example, the FileName field in Contents contains s1c4.html for the "SQL—The Original" document. The first two characters indicate the section, so this is section 1. Although FileName has "html" as the extension, that was used when generating the help (CHM) file. On this site, all documents are Markdown (md) files, so the document for "SQL—The Original" is section1/s1c4.md.
8+
9+
* NewAllCAndF.dbf: contains every command, function, class, property, method, and event in VFP and its document number. All documents are in the section4 folder and start with "s4g". For example, the nGroup field in NewAllCAndF contains 408 for TAGNO(), which means the document for that function is section4/s4g408.md.
10+
11+
Both of these tables are provided as DB2 files, which are text equivalents of the DBF files. To convert these files to tables, use FoxBin2PRG or run ConvertTextToBinary.bat.

license.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Licensing
2+
3+
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.

section4/s4g577.md

Lines changed: 76 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,77 @@
1-
## Sys(1271)
2-
3-
This function, also a late addition to VFP 3, tells you the name of the form in which an instantiated object is stored.
4-
5-
### Usage
6-
7-
```foxpro
8-
uFileName = SYS( 1271, oObject )
9-
```
10-
<table>
11-
<tr>
12-
<td width="25%" valign="top">
13-
<p><b>Property</b></p>
14-
</td>
15-
<td width="14%" valign="top">
16-
<p><b>Value</b></p>
17-
</td>
18-
<td width="61%" valign="top">
19-
<p><b>Purpose</b></p>
20-
</td>
21-
</tr>
22-
<tr>
23-
<td width="25%" valign="top">
24-
<p>oObject</p>
25-
</td>
26-
<td width="14%" valign="top">
27-
<p>Object</p>
28-
</td>
29-
<td width="61%" valign="top">
30-
<p>The object for which you want to know the file name.</p>
31-
</td>
32-
</tr>
33-
<tr>
34-
<td width="25%" rowspan="2" valign="top">
35-
<p>uFileName</p>
36-
</td>
37-
<td width="14%" valign="top">
38-
<p>Character</p>
39-
</td>
40-
<td width="61%" valign="top">
41-
<p>The complete path and file name for the form containing oObject.</p>
42-
</td>
43-
</tr>
44-
<tr>
45-
<td width="19%" valign="top">
46-
<p>.F.</p>
47-
</td>
48-
<td width="81%" valign="top">
49-
<p>oObject doesn't come from a form stored in an SCX file.</p>
50-
</td>
51-
</tr>
52-
</table>
53-
54-
We can't quite see why they added this function to the language. If you could hand it any object and find out where it comes from, it would be useful, but it only handles forms created as SCX files and the objects those forms contain. On the other hand, we can't see any other way of getting to this information, so maybe there are some cases where it's useful. For example, Doug uses it when working with multiple instances of the same form. His code renames each instance to have a unique Name, so SYS(1271) lets him figure out that they're all the same form.
55-
56-
Like SYS(1270), this one returns values of two different types for no reason we can see.
57-
58-
### Example
59-
60-
```foxpro
61-
DO FORM Test
62-
? SYS(1271, _SCREEN.ActiveForm)
63-
```
64-
### See Also
65-
1+
## Sys(1271)
2+
3+
This function, also a late addition to VFP 3, tells you the name of the form in which an instantiated object is stored.
4+
5+
### Usage
6+
7+
```foxpro
8+
uFileName = SYS( 1271, oObject )
9+
```
10+
<table>
11+
<tr>
12+
<td width="25%" valign="top">
13+
<p><b>Property</b></p>
14+
</td>
15+
<td width="14%" valign="top">
16+
<p><b>Value</b></p>
17+
</td>
18+
<td width="61%" valign="top">
19+
<p><b>Purpose</b></p>
20+
</td>
21+
</tr>
22+
<tr>
23+
<td width="25%" valign="top">
24+
<p>oObject</p>
25+
</td>
26+
<td width="14%" valign="top">
27+
<p>Object</p>
28+
</td>
29+
<td width="61%" valign="top">
30+
<p>The object for which you want to know the file name.</p>
31+
</td>
32+
</tr>
33+
<tr>
34+
<td width="25%" rowspan="2" valign="top">
35+
<p>uFileName</p>
36+
</td>
37+
<td width="14%" valign="top">
38+
<p>Character</p>
39+
</td>
40+
<td width="61%" valign="top">
41+
<p>The complete path and file name for the form containing oObject.</p>
42+
</td>
43+
</tr>
44+
<tr>
45+
<td width="19%" valign="top">
46+
<p>.F.</p>
47+
</td>
48+
<td width="81%" valign="top">
49+
<p>oObject doesn't come from a form stored in an SCX file.</p>
50+
</td>
51+
</tr>
52+
</table>
53+
54+
We can't quite see why they added this function to the language. If you could hand it any object and find out where it comes from, it would be useful, but it only handles forms created as SCX files and the objects those forms contain. On the other hand, we can't see any other way of getting to this information, so maybe there are some cases where it's useful. For example, Doug uses it when working with multiple instances of the same form. His code renames each instance to have a unique Name, so SYS(1271) lets him figure out that they're all the same form.
55+
56+
Like SYS(1270), this one returns values of two different types for no reason we can see.
57+
58+
<table>
59+
<tr>
60+
<td width="17%" valign="top">
61+
<img width="95" height="77" src="bug.gif">
62+
</td>
63+
<td width="83%">
64+
<p>According to Christof Wollenhaupt, a "there is not enough memory to complete this operation" error (error 43) occurs if SYS(1271) is used in any code called from the BeforeOpenTables or Load events.</p>
65+
</td>
66+
</tr>
67+
</table>
68+
69+
### Example
70+
71+
```foxpro
72+
DO FORM Test
73+
? SYS(1271, _SCREEN.ActiveForm)
74+
```
75+
### See Also
76+
6677
[Do Form](s4g354.md), [PEMStatus()](s4g654.md), [Sys(1270)](s4g576.md)

0 commit comments

Comments
 (0)