Identifying the stalk of the general point of an integral scheme with the field of fractions of any open affine Let $X$ be an integral scheme and $\eta$ its general point. Then we can identify $\mathcal O_{X,\eta}$ with $FF(A)$ where $\operatorname{Spec} A$ is any open affine of $X$, because $\eta$ lives in all open affines. But how can we then extend any $f \in FF(A)$ to a function on the whole of $X$, i.e. to an element of $\mathcal O_{X,\eta}$?
I am not sure how to realize this algebraically because I don't know in what form I should write $\mathcal O_{X,\eta}$. When I think about it geometrically, at least I know that I am not extending $f$ to something bigger than the closure of $\operatorname{Spec} A$ because $X$ is irreducible. But does it really suffice that I am not extending a function outside the closure of its domain? Can I always extend a function to the closure of its domain of definition in algebraic geometry? (here I mean function in the sense of an element of the sheaf of rings, not as a function that should always have a non "1/0 value")
I worked this out for the $\Bbb P^n$ and at least I got the same answers. For $X=\Bbb P^n$, the general point $\eta$ is just the zero ideal in $k[x_0,...,x_n]$. So we get $\mathcal O_{X,\eta} = k(x_0,...,x_n)_0 \cong k(x_1,x_2,...x_n)$ by the dehomogenizing map $-$quotient out by $(x_0-1)$. On the other hand, if we take some affine open $\operatorname {Spec} A$ such that $A =k[x_0/x_0,x_1/x_0...,x_n/x_0]/(x_0/x_0-1)$, we also get $\eta = (0)$ and $\mathcal O_{\operatorname{Spec} A,\eta} = k(x_1/x_0,x_2/x_0,...,x_n/x_0)$.
 A: If $X=\mathrm{Spec}(A)$ is the spectrum of a domain $A$, with $\eta=(0)$ the generic point of $X$, then the equality $\mathscr{O}_{X,\eta}=A_{(0)}=\mathrm{Frac}(A)$ is built into the definition of the structure sheaf of $X$.
In general, for $X$ any scheme and $U\subseteq X$ an open subscheme, for any $x\in U$, the map $\mathscr{O}_{X,x}\rightarrow\mathscr{O}_{U,x}$ induced by the open immersion $U\hookrightarrow X$ is an isomorphism, so stalks can be ``computed" in any open subscheme. Now if $X$ is integral with generic point $\eta$ and $U=\mathrm{Spec}(A)$ is an affine open, then $\eta\in U$ and we have $\mathscr{O}_{X,\eta}=\mathscr{O}_{U,\eta}=\mathrm{Frac}(A)$. Elements of $\mathscr{O}_{X,\eta}$ are equivalence classes of pairs $(f,V)$, where $V\subseteq X$ is open and $f\in\mathscr{O}_X(V)$. In particular, any element $f\in A=\mathscr{O}_X(U)$ gives rise to the equivalence class of $(f,U)$ in $\mathscr{O}_{X,\eta}$, which is identified with the image of $f$ under the canonical injection $A\hookrightarrow\mathrm{Frac}(A)$ under the identification above. But there is no reason that an element of $\mathscr{O}_{X,\eta}$ should necessarily come from a global section of $X$. 
Maybe you mean that an element of $\mathscr{O}_{X,\eta}$ should come from a global section of $U$, i.e., from an element of $A$? But you shouldn't expect this either, because the map $A\hookrightarrow\mathrm{Frac}(A)$ is not surjective unless $A$ is already a field. 
